diff --git a/standalone/standalone/src/Runner.ts b/standalone/standalone/src/Runner.ts index 358c9428..c845a237 100644 --- a/standalone/standalone/src/Runner.ts +++ b/standalone/standalone/src/Runner.ts @@ -210,6 +210,7 @@ export class Runner { await EggModuleLoader.preLoad(moduleReferences, { baseDir: cwd, logger: console, + dump: false, }); } diff --git a/standalone/standalone/test/index.test.ts b/standalone/standalone/test/index.test.ts index cd942d4b..48802f65 100644 --- a/standalone/standalone/test/index.test.ts +++ b/standalone/standalone/test/index.test.ts @@ -299,6 +299,9 @@ describe('standalone/standalone/test/index.test.ts', () => { let Foo; beforeEach(() => { + mm.restore(); + mm.spy(ModuleDescriptorDumper, 'dump'); + delete require.cache[require.resolve(path.join(fixturePath, './foo'))]; // eslint-disable-next-line @typescript-eslint/no-var-requires Foo = require(path.join(fixturePath, './foo')).Foo; @@ -315,6 +318,7 @@ describe('standalone/standalone/test/index.test.ts', () => { 'postInject', 'init', ]); + assert.equal((ModuleDescriptorDumper.dump as any).called, 1); }); }); });