diff --git a/__tests__/helper.spec.js b/__tests__/helper.spec.js index f79991e..b545e7e 100644 --- a/__tests__/helper.spec.js +++ b/__tests__/helper.spec.js @@ -27,8 +27,8 @@ describe('helper', () => { test('diffSec', () => { const now = new Date(); - expect(diffSec(now)).toEqual(0); - expect(diffSec(now - 10000, now)).toEqual(10); + expect(diffSec(now)).toBeApproximate(0); + expect(diffSec(now - 10000, now)).toBeApproximate(10); }); test('nextInterval', () => { diff --git a/__tests__/locales.spec.js b/__tests__/locales.spec.js index 37fe50b..54d825d 100644 --- a/__tests__/locales.spec.js +++ b/__tests__/locales.spec.js @@ -61,7 +61,8 @@ describe('locales', () => { }); test('register', () => { - register('fr', () => {}); + register('fr', () => 'test'); expect(Locales).toContainKey('fr'); + expect(Locales.fr()).toBe('test'); }); }); diff --git a/demo/index.html b/demo/index.html index 2f0170f..25d31eb 100644 --- a/demo/index.html +++ b/demo/index.html @@ -55,6 +55,13 @@
You opened this page .
+ ++ You opened this page . + + +
+