diff --git a/test/global.js b/test/global.js index da275b1..a66c0f0 100644 --- a/test/global.js +++ b/test/global.js @@ -29,13 +29,16 @@ describe('global or singleton test', function() { assert.deepEqual(message3.list(),[ { code: '007', message: { en: 'global or singleton test' } } ]); }); - it('re-init and load will change globally', function() { + it('re-init and load will change globally', function(done) { const message4 = require('../src/message-dictionary'); message4.init({ dirPath: path.join('./locales'), namespace: 'global2' }).load(); - assert.deepEqual(message4.list(),[]); + setTimeout(function () { + assert.deepEqual(message4.list(),[]); + done(); + }, 1000) }); it('cleanup global test', function() {