Skip to content

Commit 7a611b6

Browse files
author
Matt Gaunt
authored
Adds usePublicVapidKey() (#482)
* Uses new token models, adds usePublicVapidKey() and improved integration tests. * Updated yarn lock * Resetting karma config
1 parent 453677f commit 7a611b6

File tree

72 files changed

+5758
-2397
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+5758
-2397
lines changed

config/karma.base.js

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
const karma = require('karma');
1818
const path = require('path');
1919
const webpackTestConfig = require('./webpack.test');
20-
const { argv } = require('yargs');
20+
const {argv} = require('yargs');
2121

2222
/**
2323
* Custom SauceLabs Launchers
@@ -54,14 +54,11 @@ const config = {
5454
browserNoActivityTimeout: 65000,
5555

5656
// preprocess matching files before serving them to the browser
57-
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
58-
preprocessors: {
59-
'test/**/*.ts': ['webpack', 'sourcemap']
60-
},
57+
// available preprocessors:
58+
// https://npmjs.org/browse/keyword/karma-preprocessor
59+
preprocessors: {'test/**/*.ts': ['webpack', 'sourcemap']},
6160

62-
mime: {
63-
'text/x-typescript': ['ts', 'tsx']
64-
},
61+
mime: {'text/x-typescript': ['ts', 'tsx']},
6562

6663
// test results reporter to use
6764
// possible values: 'dots', 'progress'
@@ -75,26 +72,24 @@ const config = {
7572
colors: true,
7673

7774
// level of logging
78-
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
75+
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN
76+
// || config.LOG_INFO || config.LOG_DEBUG
7977
logLevel: karma.constants.LOG_INFO,
8078

81-
// enable / disable watching file and executing tests whenever any file changes
79+
// enable / disable watching file and executing tests whenever any file
80+
// changes
8281
autoWatch: false,
8382

8483
customLaunchers: sauceLabsBrowsers,
8584

8685
// start these browsers
87-
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
86+
// available browser launchers:
87+
// https://npmjs.org/browse/keyword/karma-launcher
8888
browsers: ['ChromeHeadless'],
8989

9090
webpack: webpackTestConfig,
9191

92-
webpackMiddleware: {
93-
quiet: true,
94-
stats: {
95-
colors: true
96-
}
97-
},
92+
webpackMiddleware: {quiet: true, stats: {colors: true}},
9893

9994
sauceLabs: {
10095
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER,
@@ -106,10 +101,7 @@ const config = {
106101
singleRun: false,
107102

108103
client: {
109-
mocha: {
110-
timeout: 20000,
111-
retries: 3
112-
},
104+
mocha: {timeout: 20000, retries: 3},
113105

114106
// Pass through --grep option to filter the tests that run.
115107
args: argv.grep ? ['--grep', argv.grep] : []
@@ -118,7 +110,7 @@ const config = {
118110
coverageIstanbulReporter: {
119111
dir: path.resolve(process.cwd(), 'coverage/browser/%browser%'),
120112
fixWebpackSourcePaths: true,
121-
reports: ['lcovonly']
113+
reports: ['html', 'lcovonly']
122114
}
123115
};
124116

integration/messaging/test/static/manual-test-server.js renamed to integration/messaging/manual-test-server.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17-
const testServer = require('./test-server');
18-
testServer.start();
17+
const testServer = require('./test/utils/test-server');
18+
testServer
19+
.start()
20+
.then(() => console.log(`Test server: ${testServer.serverAddress}`))
21+
.catch(err => console.error(err));

integration/messaging/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
"private": true,
44
"version": "0.2.1",
55
"scripts": {
6-
"pretest:manual": "node ./download-browsers.js",
7-
"test": "echo 'Automated tests temporarily disabled, run `npm run test:manual` to execute these tests'",
8-
"test:manual": "mocha --retries 3 --exit"
6+
"pretest": "node ./download-browsers.js",
7+
"test": "mocha --exit"
98
},
109
"dependencies": {
1110
"firebase": "4.9.1"
@@ -17,6 +16,7 @@
1716
"geckodriver": "^1.8.0",
1817
"mocha": "^4.0.1",
1918
"node-fetch": "^1.7.2",
20-
"selenium-assistant": "^5.1.0"
19+
"selenium-assistant": "^5.2.0",
20+
"sinon": "^4.1.3"
2121
}
2222
}

integration/messaging/test/send-receive-msg.js

Lines changed: 0 additions & 263 deletions
This file was deleted.

0 commit comments

Comments
 (0)