Skip to content

Commit

Permalink
- update global unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
aalfiann committed Oct 23, 2019
1 parent dce912f commit c67c7e1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/global.js
Expand Up @@ -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() {
Expand Down

0 comments on commit c67c7e1

Please sign in to comment.