perf: 로그인 메인 로직 배럴 로딩 제거
This commit is contained in:
@@ -4,6 +4,7 @@ import path from 'node:path';
|
||||
import { describe, it } from 'node:test';
|
||||
|
||||
const routerSourcePath = path.resolve(import.meta.dirname, '../src/router/index.ts');
|
||||
const mainDashboardSourcePath = path.resolve(import.meta.dirname, '../src/stores/mainDashboard.ts');
|
||||
|
||||
void describe('game route loading contract', () => {
|
||||
void it('loads view components through route-level dynamic imports', async () => {
|
||||
@@ -18,4 +19,11 @@ void describe('game route loading contract', () => {
|
||||
assert.equal(lazyViewImports.length, routedViewComponents.size);
|
||||
assert.ok(lazyViewImports.length >= 35);
|
||||
});
|
||||
|
||||
void it('does not preload the server-side logic barrel from the main dashboard', async () => {
|
||||
const source = await readFile(mainDashboardSourcePath, 'utf8');
|
||||
|
||||
assert.doesNotMatch(source, /from\s+['"]@sammo-ts\/logic['"]/);
|
||||
assert.match(source, /from\s+['"]@sammo-ts\/logic\/messages\/message\.js['"]/);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user