Skip to content

Commit 1fdc999

Browse files
committed
prettier
1 parent 4097d31 commit 1fdc999

File tree

4 files changed

+23
-19
lines changed

4 files changed

+23
-19
lines changed

packages-exp/performance-exp/src/index.test.ts

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,28 +48,30 @@ describe('Firebase Performance > initializePerformance()', () => {
4848
expect(initializePerformance(app)).to.equal(performanceInstance);
4949
});
5050
it('returns same instance if given same params a second time', () => {
51-
const performanceInstance = initializePerformance(app, { dataCollectionEnabled: false });
52-
expect(initializePerformance(app, { dataCollectionEnabled: false })).to.equal(performanceInstance);
51+
const performanceInstance = initializePerformance(app, {
52+
dataCollectionEnabled: false
53+
});
54+
expect(
55+
initializePerformance(app, { dataCollectionEnabled: false })
56+
).to.equal(performanceInstance);
5357
});
5458
it('throws if called with params after being called with no params', () => {
5559
initializePerformance(app);
5660
const expectedError = ERROR_FACTORY.create(ErrorCode.ALREADY_INITIALIZED);
57-
expect(() => initializePerformance(app, { dataCollectionEnabled: false })).to.throw(
58-
expectedError.message
59-
);
61+
expect(() =>
62+
initializePerformance(app, { dataCollectionEnabled: false })
63+
).to.throw(expectedError.message);
6064
});
6165
it('throws if called with no params after being called with params', () => {
6266
initializePerformance(app, { instrumentationEnabled: false });
6367
const expectedError = ERROR_FACTORY.create(ErrorCode.ALREADY_INITIALIZED);
64-
expect(() => initializePerformance(app)).to.throw(
65-
expectedError.message
66-
);
68+
expect(() => initializePerformance(app)).to.throw(expectedError.message);
6769
});
6870
it('throws if called a second time with different params', () => {
6971
initializePerformance(app, { instrumentationEnabled: true });
7072
const expectedError = ERROR_FACTORY.create(ErrorCode.ALREADY_INITIALIZED);
71-
expect(() => initializePerformance(app, { instrumentationEnabled: false })).to.throw(
72-
expectedError.message
73-
);
73+
expect(() =>
74+
initializePerformance(app, { instrumentationEnabled: false })
75+
).to.throw(expectedError.message);
7476
});
7577
});

packages-exp/performance-exp/src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,10 @@ export function initializePerformance(
8282
const existingInstance = provider.getImmediate();
8383
const initialSettings = provider.getOptions() as PerformanceSettings;
8484
if (
85-
settings?.dataCollectionEnabled === initialSettings?.dataCollectionEnabled &&
86-
settings?.instrumentationEnabled === initialSettings?.instrumentationEnabled
85+
settings?.dataCollectionEnabled ===
86+
initialSettings?.dataCollectionEnabled &&
87+
settings?.instrumentationEnabled ===
88+
initialSettings?.instrumentationEnabled
8789
) {
8890
return existingInstance;
8991
} else {

packages-exp/performance-exp/src/utils/errors.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ const ERROR_DESCRIPTION_MAP: { readonly [key in ErrorCode]: string } = {
6060
'Custom metric name {$customMetricName} is invalid',
6161
[ErrorCode.INVALID_STRING_MERGER_PARAMETER]:
6262
'Input for String merger is invalid, contact support team to resolve.',
63-
[ErrorCode.ALREADY_INITIALIZED]:
64-
'initializePerformance() has already been called with ' +
65-
'different options. To avoid this error, call initializePerformance() with the ' +
66-
'same options as when it was originally called, or call getPerformance() to return the' +
67-
' already initialized instance.'
63+
[ErrorCode.ALREADY_INITIALIZED]:
64+
'initializePerformance() has already been called with ' +
65+
'different options. To avoid this error, call initializePerformance() with the ' +
66+
'same options as when it was originally called, or call getPerformance() to return the' +
67+
' already initialized instance.'
6868
};
6969

7070
interface ErrorParams {

tools/gitHooks/prettier.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ async function doPrettier(changedFiles) {
101101
}
102102

103103
const gitSpinner = ora(' Git staging prettier formatting changes.').start();
104-
await exec('git add -u .', {stdio: 'inherit'});
104+
await exec('git add -u .', { stdio: 'inherit' });
105105
gitSpinner.stopAndPersist({
106106
symbol: '▶️'
107107
});

0 commit comments

Comments
 (0)