Skip to content

Commit fccebe2

Browse files
committed
fix: disable dump in preload
1 parent 1a10a17 commit fccebe2

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

standalone/standalone/src/Runner.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ export class Runner {
210210
await EggModuleLoader.preLoad(moduleReferences, {
211211
baseDir: cwd,
212212
logger: console,
213+
dump: false,
213214
});
214215
}
215216

standalone/standalone/test/index.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,9 @@ describe('standalone/standalone/test/index.test.ts', () => {
299299
let Foo;
300300

301301
beforeEach(() => {
302+
mm.restore();
303+
mm.spy(ModuleDescriptorDumper, 'dump');
304+
302305
delete require.cache[require.resolve(path.join(fixturePath, './foo'))];
303306
// eslint-disable-next-line @typescript-eslint/no-var-requires
304307
Foo = require(path.join(fixturePath, './foo')).Foo;
@@ -315,6 +318,7 @@ describe('standalone/standalone/test/index.test.ts', () => {
315318
'postInject',
316319
'init',
317320
]);
321+
assert.equal((ModuleDescriptorDumper.dump as any).called, 1);
318322
});
319323
});
320324
});

0 commit comments

Comments
 (0)