diff --git a/spec/main.spec.ts b/spec/main.spec.ts index 9ff1cce..2a2d4bb 100644 --- a/spec/main.spec.ts +++ b/spec/main.spec.ts @@ -134,8 +134,9 @@ describe('main', () => { }); describe('#mockConfig', () => { - after(() => { + afterEach(() => { delete process.env.CLOUD_RUNTIME_CONFIG; + delete functions.config.singleton; }); it('should mock functions.config()', () => { @@ -143,5 +144,11 @@ describe('main', () => { mockConfig(config); expect(functions.config()).to.deep.equal(config); }); + + it('should allow multiple mock configurations', () => { + const config = { baz: { qux: 'quxx ' } }; + mockConfig(config); + expect(functions.config()).to.deep.equal(config); + }); }); });