UNPKG

@interaktiv/mibuilder-core

Version:

Core libraries to interact with MiBuilder projects.

31 lines (27 loc) 728 B
"use strict"; var _configStore = require("./config-store"); class TestConfig extends _configStore.BaseConfigStore { async init() {} } describe('ConfigStore', () => { it('should iterate over each value', async () => { const config = await TestConfig.create({}); config.set('1', 'a'); config.set('2', 'b'); let st = ''; config.forEach((key, val) => { st += `${key}${val}`; }); expect(st).toBe('1a2b'); }); it('should await each value', async () => { const config = await TestConfig.create({}); config.set('1', 'a'); config.set('2', 'b'); let st = ''; await config.awaitEach((key, val) => { st += `${key}${val}`; }); expect(st).toBe('1a2b'); }); });