Commit 7be80215 authored by yogevbd's avatar yogevbd

Fix js tests

parent 2b912437
...@@ -185,4 +185,11 @@ describe('Commands', () => { ...@@ -185,4 +185,11 @@ describe('Commands', () => {
verify(mockedNativeCommandsSender.getDeliveredNotifications()).called(); verify(mockedNativeCommandsSender.getDeliveredNotifications()).called();
}); });
}); });
describe('refreshToken', () => {
it('sends to native', () => {
uut.refreshToken();
verify(mockedNativeCommandsSender.refreshToken()).called();
});
});
}); });
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
"scripts": { "scripts": {
"build": "rm -rf ./lib/dist && tsc", "build": "rm -rf ./lib/dist && tsc",
"prestart": "npm run build", "prestart": "npm run build",
"pretest": "./node_modules/.bin/eslint *.js test", "pretest-js": "npm run build",
"test": "node scripts/test", "test": "node scripts/test",
"start": "node ./scripts/start", "start": "node ./scripts/start",
"pretest-e2e-ios-release": "npm run build", "pretest-e2e-ios-release": "npm run build",
...@@ -108,13 +108,16 @@ ...@@ -108,13 +108,16 @@
}, },
"roots": [ "roots": [
"<rootDir>/node_modules/", "<rootDir>/node_modules/",
"<rootDir>/test/" "<rootDir>/lib/dist/"
], ],
"collectCoverageFrom": [ "collectCoverageFrom": [
"lib/dist/**/*.js",
"lib/src/**/*.js", "lib/src/**/*.js",
"integration/**/*.js", "integration/**/*.js",
"!lib/dist/index.js", "!lib/dist/index.js",
"!lib/dist/Notifications.js", "!lib/dist/Notifications.js",
"!lib/dist/NotificationsIOS.js",
"!lib/dist/NotificationsAndroid.js",
"!lib/dist/adapters/**/*", "!lib/dist/adapters/**/*",
"!lib/dist/interfaces/**/*", "!lib/dist/interfaces/**/*",
"!lib/dist/**/*.test.*", "!lib/dist/**/*.test.*",
......
...@@ -5,10 +5,8 @@ const fix = _.includes(process.argv, '--fix') ? '--fix' : ''; ...@@ -5,10 +5,8 @@ const fix = _.includes(process.argv, '--fix') ? '--fix' : '';
const dirs = [ const dirs = [
'lib', 'lib',
'integration',
'e2e',
'scripts', 'scripts',
'playground/src' 'example/src'
]; ];
run(); run();
......
...@@ -3,7 +3,7 @@ const exec = require('shell-utils').exec; ...@@ -3,7 +3,7 @@ const exec = require('shell-utils').exec;
run(); run();
function 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-ios`);
exec.execSync(`npm run test-unit-android`); exec.execSync(`npm run test-unit-android`);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment