From cf38ba38033738c129aef3f5d9041d7e51d29ec7 Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Tue, 12 Sep 2023 14:57:19 +0800 Subject: [PATCH] f --- standalone/standalone/test/index.test.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/standalone/standalone/test/index.test.ts b/standalone/standalone/test/index.test.ts index fe8640be..01c6966d 100644 --- a/standalone/standalone/test/index.test.ts +++ b/standalone/standalone/test/index.test.ts @@ -84,7 +84,23 @@ describe('test/index.test.ts', () => { describe('runner with runtimeConfig', () => { it('should work', async () => { const msg = await main(path.join(__dirname, './fixtures/runtime-config')); - assert.deepEqual(msg, { baseDir: path.join(__dirname, './fixtures/runtime-config') }); + assert.deepEqual(msg, { + baseDir: path.join(__dirname, './fixtures/runtime-config'), + env: undefined, + name: undefined, + }); + }); + + it('should auto set name and env', async () => { + const msg = await main(path.join(__dirname, './fixtures/runtime-config'), { + name: 'foo', + env: 'unittest', + }); + assert.deepEqual(msg, { + baseDir: path.join(__dirname, './fixtures/runtime-config'), + name: 'foo', + env: 'unittest', + }); }); });