diff --git a/lib/src/commands/Commands.test.ts b/lib/src/commands/Commands.test.ts index 698ebf7d5dd1849fd2721fcffb25f6074ae0ccf5..dd1a2995f9084583a22f5dc13ffddb75c6f3b314 100644 --- a/lib/src/commands/Commands.test.ts +++ b/lib/src/commands/Commands.test.ts @@ -185,4 +185,11 @@ describe('Commands', () => { verify(mockedNativeCommandsSender.getDeliveredNotifications()).called(); }); }); + + describe('refreshToken', () => { + it('sends to native', () => { + uut.refreshToken(); + verify(mockedNativeCommandsSender.refreshToken()).called(); + }); + }); }); diff --git a/package.json b/package.json index dca1dad0e83743af6f9af1155cfc9c3e24225e5f..20856259203962939a3e7b5d3a14ba1fb81df5c4 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "scripts": { "build": "rm -rf ./lib/dist && tsc", "prestart": "npm run build", - "pretest": "./node_modules/.bin/eslint *.js test", + "pretest-js": "npm run build", "test": "node scripts/test", "start": "node ./scripts/start", "pretest-e2e-ios-release": "npm run build", @@ -108,13 +108,16 @@ }, "roots": [ "/node_modules/", - "/test/" + "/lib/dist/" ], "collectCoverageFrom": [ + "lib/dist/**/*.js", "lib/src/**/*.js", "integration/**/*.js", "!lib/dist/index.js", "!lib/dist/Notifications.js", + "!lib/dist/NotificationsIOS.js", + "!lib/dist/NotificationsAndroid.js", "!lib/dist/adapters/**/*", "!lib/dist/interfaces/**/*", "!lib/dist/**/*.test.*", diff --git a/scripts/test-js.js b/scripts/test-js.js index 953a9e54065cfaad9c04b04b53cb44a836637057..0613aa3e82b67ce36bf1e0d3f6f9ac2f2de6087a 100644 --- a/scripts/test-js.js +++ b/scripts/test-js.js @@ -5,10 +5,8 @@ const fix = _.includes(process.argv, '--fix') ? '--fix' : ''; const dirs = [ 'lib', - 'integration', - 'e2e', 'scripts', - 'playground/src' + 'example/src' ]; run(); diff --git a/scripts/test.js b/scripts/test.js index 2f4ad9f637c40be3c3a9edab9e838c00e3bacb82..31f9bb67e36cdd1b25da46fcb04f185c5f1dcd89 100644 --- a/scripts/test.js +++ b/scripts/test.js @@ -3,7 +3,7 @@ const exec = require('shell-utils').exec; run(); function run() { - exec.execSync(`jest`); + exec.execSync(`npm run test-js`); exec.execSync(`npm run test-unit-ios`); exec.execSync(`npm run test-unit-android`); }