Skip to content

Commit ed31954

Browse files
authored
Merge branch 'master' into api
2 parents 5624886 + b07f822 commit ed31954

File tree

111 files changed

+728
-978
lines changed

Some content is hidden

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

111 files changed

+728
-978
lines changed

.prettierrc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
singleQuote: true,
33
printWidth: 80,
4-
quoteProps: preserve
5-
}
4+
quoteProps: preserve,
5+
trailingComma: none,
6+
arrowParens: avoid
7+
}

config/karma.saucelabs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ function appiumLauncher(
153153
};
154154
}
155155

156-
module.exports = function(config) {
156+
module.exports = function (config) {
157157
const { packageName, files: testFiles } = getTestFiles();
158158
const sauceLabsBrowsers = getSauceLabsBrowsers(packageName);
159159

integration/browserify/karma.conf.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright 2017 Google Inc.
3+
* Copyright 2017 Google LLC
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ const karmaBase = require('../../config/karma.base');
2121

2222
const files = [`dist/**/*`];
2323

24-
module.exports = function(config) {
24+
module.exports = function (config) {
2525
const karmaConfig = Object.assign({}, karmaBase, {
2626
// files to load into karma
2727
files: files,

integration/browserify/src/namespace.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright 2017 Google Inc.
3+
* Copyright 2017 Google LLC
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -29,6 +29,6 @@ firebase.initializeApp({
2929
appId: 'myAppId'
3030
});
3131

32-
describe('Firebase Namespace Validation', function() {
32+
describe('Firebase Namespace Validation', function () {
3333
validateNamespace(namespaceDefinition, firebase);
3434
});

integration/firestore/karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const karmaBase = require('../../config/karma.base');
2121

2222
const files = ['./dist/test-harness.js'];
2323

24-
module.exports = function(config) {
24+
module.exports = function (config) {
2525
const karmaConfig = Object.assign({}, karmaBase, {
2626
// files to load into karma
2727
files: files,

integration/messaging/test/test-deleteToken.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ const createPermittedWebDriver = require('./utils/createPermittedWebDriver');
2626
const TEST_SUITE_TIMEOUT_MS = 100000;
2727
const TEST_DOMAIN = 'valid-vapid-key';
2828

29-
describe('Firebase Messaging Integration Tests > get and delete token', function() {
29+
describe('Firebase Messaging Integration Tests > get and delete token', function () {
3030
this.timeout(TEST_SUITE_TIMEOUT_MS);
3131
this.retries(3);
3232
let globalWebDriver;
3333

34-
before(async function() {
34+
before(async function () {
3535
await testServer.start();
3636
});
3737

38-
after(async function() {
38+
after(async function () {
3939
await testServer.stop();
4040
});
4141

@@ -46,8 +46,8 @@ describe('Firebase Messaging Integration Tests > get and delete token', function
4646
return;
4747
}
4848

49-
describe(`Testing browser: ${assistantBrowser.getPrettyName()} : ${TEST_DOMAIN}`, function() {
50-
before(async function() {
49+
describe(`Testing browser: ${assistantBrowser.getPrettyName()} : ${TEST_DOMAIN}`, function () {
50+
before(async function () {
5151
// Use one webDriver per browser instead of one per test to speed up test.
5252
globalWebDriver = createPermittedWebDriver(
5353
/* browser= */ assistantBrowser.getId()
@@ -58,15 +58,15 @@ describe('Firebase Messaging Integration Tests > get and delete token', function
5858
);
5959
});
6060

61-
after(async function() {
61+
after(async function () {
6262
await seleniumAssistant.killWebDriver(globalWebDriver);
6363
});
6464

65-
afterEach(async function() {
65+
afterEach(async function () {
6666
await clearAppForTest(globalWebDriver);
6767
});
6868

69-
it(`Test app can delete a valid token`, async function() {
69+
it(`Test app can delete a valid token`, async function () {
7070
const token = await retrieveToken(globalWebDriver);
7171
expect(token).to.exist;
7272
try {

integration/messaging/test/test-send.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ const WAIT_TIME_BEFORE_RETRIEVING_BACKGROUND_MESSAGES_MILLISECONDS = 60000;
4848

4949
const wait = ms => new Promise(res => setTimeout(res, ms));
5050

51-
describe('Starting Integration Test > Sending and Receiving ', function() {
51+
describe('Starting Integration Test > Sending and Receiving ', function () {
5252
this.retries(3);
5353
let globalWebDriver;
5454

55-
before(async function() {
55+
before(async function () {
5656
await testServer.start();
5757
});
5858

59-
after(async function() {
59+
after(async function () {
6060
await testServer.stop();
6161
});
6262

@@ -135,9 +135,10 @@ describe('Starting Integration Test > Sending and Receiving ', function() {
135135
/* expectedDataPayload= */ getTestDataPayload()
136136
);
137137
});
138+
138139
});
139140

140-
it('Foreground app can receive a {} empty message in onMessage', async function() {
141+
it('Foreground app can receive a {} empty message in onMessage', async function () {
141142
this.timeout(TIMEOUT_FOREGROUND_MESSAGE_TEST_UNIT_MILLISECONDS);
142143

143144
await seleniumAssistant.killWebDriver(globalWebDriver);
@@ -162,7 +163,7 @@ describe('Starting Integration Test > Sending and Receiving ', function() {
162163
);
163164
});
164165

165-
it('Foreground app can receive a {"notification"} message in onMessage', async function() {
166+
it('Foreground app can receive a {"notification"} message in onMessage', async function () {
166167
this.timeout(TIMEOUT_FOREGROUND_MESSAGE_TEST_UNIT_MILLISECONDS);
167168

168169
await seleniumAssistant.killWebDriver(globalWebDriver);
@@ -187,7 +188,7 @@ describe('Starting Integration Test > Sending and Receiving ', function() {
187188
);
188189
});
189190

190-
it('Foreground app can receive a {"data"} message in onMessage', async function() {
191+
it('Foreground app can receive a {"data"} message in onMessage', async function () {
191192
this.timeout(TIMEOUT_FOREGROUND_MESSAGE_TEST_UNIT_MILLISECONDS);
192193

193194
await seleniumAssistant.killWebDriver(globalWebDriver);
@@ -212,7 +213,7 @@ describe('Starting Integration Test > Sending and Receiving ', function() {
212213
);
213214
});
214215

215-
it('Foreground app can receive a {"notification", "data"} message in onMessage', async function() {
216+
it('Foreground app can receive a {"notification", "data"} message in onMessage', async function () {
216217
this.timeout(TIMEOUT_FOREGROUND_MESSAGE_TEST_UNIT_MILLISECONDS);
217218

218219
await seleniumAssistant.killWebDriver(globalWebDriver);

integration/messaging/test/test-updateToken.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ const getErrors = require('./utils/getErrors');
2828
const TEST_SUITE_TIMEOUT_MS = 70000;
2929
const TEST_DOMAIN = 'valid-vapid-key';
3030

31-
describe('Firebase Messaging Integration Tests > update a token', function() {
31+
describe('Firebase Messaging Integration Tests > update a token', function () {
3232
this.timeout(TEST_SUITE_TIMEOUT_MS);
3333
this.retries(3);
3434

3535
let globalWebDriver;
3636

37-
before(async function() {
37+
before(async function () {
3838
await testServer.start();
3939
});
4040

41-
after(async function() {
41+
after(async function () {
4242
await testServer.stop();
4343
});
4444

@@ -49,8 +49,8 @@ describe('Firebase Messaging Integration Tests > update a token', function() {
4949
return;
5050
}
5151

52-
describe(`Testing browser: ${assistantBrowser.getPrettyName()} : ${TEST_DOMAIN}`, function() {
53-
before(async function() {
52+
describe(`Testing browser: ${assistantBrowser.getPrettyName()} : ${TEST_DOMAIN}`, function () {
53+
before(async function () {
5454
// Use one webDriver per browser instead of one per test to speed up test.
5555
globalWebDriver = createPermittedWebDriver(
5656
/* browser= */ assistantBrowser.getId()
@@ -60,15 +60,15 @@ describe('Firebase Messaging Integration Tests > update a token', function() {
6060
);
6161
});
6262

63-
after(async function() {
63+
after(async function () {
6464
await seleniumAssistant.killWebDriver(globalWebDriver);
6565
});
6666

67-
afterEach(async function() {
67+
afterEach(async function () {
6868
await clearAppForTest(globalWebDriver);
6969
});
7070

71-
it(`should update a token`, async function() {
71+
it(`should update a token`, async function () {
7272
const token = await retrieveToken(globalWebDriver);
7373
expect(token).to.exist;
7474

integration/messaging/test/test-useDefaultServiceWorker.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,31 @@ const createPermittedWebDriver = require('./utils/createPermittedWebDriver');
2424
const TEST_DOMAIN = 'default-sw';
2525
const TEST_SUITE_TIMEOUT_MS = 70000;
2626

27-
describe(`Firebase Messaging Integration Tests > Use 'firebase-messaging-sw.js' by default`, function() {
27+
describe(`Firebase Messaging Integration Tests > Use 'firebase-messaging-sw.js' by default`, function () {
2828
this.timeout(TEST_SUITE_TIMEOUT_MS);
2929

3030
this.retries(3);
3131

3232
let globalWebDriver;
3333

34-
before(async function() {
34+
before(async function () {
3535
await testServer.start();
3636
});
3737

38-
after(async function() {
38+
after(async function () {
3939
await testServer.stop();
4040
await seleniumAssistant.killWebDriver(globalWebDriver);
4141
});
4242

43-
it(`should use default SW by default`, async function() {
43+
it(`should use default SW by default`, async function () {
4444
globalWebDriver = createPermittedWebDriver('chrome');
4545
await globalWebDriver.get(`${testServer.serverAddress}/${TEST_DOMAIN}/`);
4646

4747
// If we have a token, then we know the default SW worked.
4848
const token = await retrieveToken(globalWebDriver);
4949
expect(token).to.exist;
5050

51-
const result = await globalWebDriver.executeAsyncScript(function(cb) {
51+
const result = await globalWebDriver.executeAsyncScript(function (cb) {
5252
navigator.serviceWorker
5353
.getRegistrations()
5454
.then(swReg => {

integration/messaging/test/test-useValidManifest.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,23 @@ const createPermittedWebDriver = require('./utils/createPermittedWebDriver');
2424
const TEST_DOMAIN = 'valid-manifest';
2525
const TEST_SUITE_TIMEOUT_MS = 70000;
2626

27-
describe(`Firebase Messaging Integration Tests > Use 'use valid manifest`, function() {
27+
describe(`Firebase Messaging Integration Tests > Use 'use valid manifest`, function () {
2828
this.timeout(TEST_SUITE_TIMEOUT_MS);
2929

3030
this.retries(3);
3131

3232
let globalWebDriver;
3333

34-
before(async function() {
34+
before(async function () {
3535
await testServer.start();
3636
});
3737

38-
after(async function() {
38+
after(async function () {
3939
await testServer.stop();
4040
await seleniumAssistant.killWebDriver(globalWebDriver);
4141
});
4242

43-
it(`should allow valid manifest`, async function() {
43+
it(`should allow valid manifest`, async function () {
4444
globalWebDriver = createPermittedWebDriver('chrome');
4545
await globalWebDriver.get(`${testServer.serverAddress}/${TEST_DOMAIN}/`);
4646

integration/shared/validator.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright 2017 Google Inc.
3+
* Copyright 2017 Google LLC
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -22,8 +22,8 @@ function validateNamespace(definition, candidate) {
2222
const keys = Object.keys(definition).filter(key => !~key.indexOf('__'));
2323

2424
if (!validatedVersion) {
25-
describe('Firebase SDK Version', function() {
26-
it('Should be properly defined', function() {
25+
describe('Firebase SDK Version', function () {
26+
it('Should be properly defined', function () {
2727
__expect(candidate.SDK_VERSION).to.equal(
2828
require('../../packages/firebase/package.json').version
2929
);
@@ -54,12 +54,12 @@ function validateNamespace(definition, candidate) {
5454
iKey => ~iKey.indexOf('__return')
5555
);
5656

57-
describe(`${key}`, function() {
57+
describe(`${key}`, function () {
5858
/**
5959
* Tests of the actual API
6060
*/
6161
if (definitionChunk.__type) {
62-
it(`Should be a \`${definitionChunk.__type}\``, function() {
62+
it(`Should be a \`${definitionChunk.__type}\``, function () {
6363
__expect(candidateChunk).to.be.a(definitionChunk.__type);
6464
});
6565
}

integration/typescript/karma.conf.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright 2017 Google Inc.
3+
* Copyright 2017 Google LLC
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ const karmaBase = require('../../config/karma.base');
2121

2222
const files = ['test/**/*.test.*'];
2323

24-
module.exports = function(config) {
24+
module.exports = function (config) {
2525
const karmaConfig = Object.assign({}, karmaBase, {
2626
// files to load into karma
2727
files: files,

integration/typescript/test/namespace.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ firebase.initializeApp({
2929
appId: 'myAppId'
3030
});
3131

32-
describe('Firebase Namespace Validation', function() {
32+
describe('Firebase Namespace Validation', function () {
3333
validateNamespace(namespaceDefinition, firebase);
3434
});

integration/webpack/karma.conf.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright 2017 Google Inc.
3+
* Copyright 2017 Google LLC
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ const karmaBase = require('../../config/karma.base');
2121

2222
const files = [`dist/**/*`];
2323

24-
module.exports = function(config) {
24+
module.exports = function (config) {
2525
const karmaConfig = Object.assign({}, karmaBase, {
2626
// files to load into karma
2727
files: files,

integration/webpack/src/namespace.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright 2017 Google Inc.
3+
* Copyright 2017 Google LLC
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -29,6 +29,6 @@ firebase.initializeApp({
2929
appId: 'myAppId'
3030
});
3131

32-
describe('Firebase Namespace Validation', function() {
32+
describe('Firebase Namespace Validation', function () {
3333
validateNamespace(namespaceDefinition, firebase);
3434
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
"npm-run-path": "4.0.1",
130130
"nyc": "15.1.0",
131131
"ora": "4.0.4",
132-
"prettier": "1.19.1",
132+
"prettier": "2.0.5",
133133
"protractor": "5.4.2",
134134
"rxjs": "6.6.0",
135135
"semver": "7.3.2",

packages-exp/app-exp/karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const karmaBase = require('../../config/karma.base');
1919

2020
const files = ['src/**/*.test.ts'];
2121

22-
module.exports = function(config) {
22+
module.exports = function (config) {
2323
const karmaConfig = Object.assign({}, karmaBase, {
2424
// files to load into karma
2525
files: files,

0 commit comments

Comments
 (0)