Skip to content

Commit 5379f7f

Browse files
committed
updated linting and jest test
1 parent dbb1363 commit 5379f7f

7 files changed

Lines changed: 16 additions & 9 deletions

File tree

integration_tests/__tests__/__snapshots__/show_config.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ exports[`--showConfig outputs config info and exits 1`] = `
7777
\\"maxWorkers\\": \\"[maxWorkers]\\",
7878
\\"noStackTrace\\": false,
7979
\\"nonFlagArgs\\": [],
80-
\\"notify\\": false,
80+
\\"notify\\": \\"false\\",
8181
\\"passWithNoTests\\": false,
8282
\\"rootDir\\": \\"<<REPLACED_ROOT_DIR>>\\",
8383
\\"runTestsByPath\\": false,

packages/jest-cli/src/reporters/notify_reporter.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,22 @@ export default class NotifyReporter extends BaseReporter {
3737
const success =
3838
result.numFailedTests === 0 && result.numRuntimeErrorTestSuites === 0;
3939

40-
if (success && (this._globalConfig.notify === "true" || this._globalConfig.notify === "onSuccess")) {
40+
if (
41+
success &&
42+
(this._globalConfig.notify === 'true' ||
43+
this._globalConfig.notify === 'onSuccess')
44+
) {
4145
const title = util.format('%d%% Passed', 100);
4246
const message = util.format(
4347
(isDarwin ? '\u2705 ' : '') + '%d tests passed',
4448
result.numPassedTests,
4549
);
4650

4751
notifier.notify({icon, message, title});
48-
} else if (this._globalConfig.notify === "true" || this._globalConfig.notify === "onFailure") {
52+
} else if (
53+
this._globalConfig.notify === 'true' ||
54+
this._globalConfig.notify === 'onFailure'
55+
) {
4956
const failed = result.numFailedTests / result.numTotalTests;
5057

5158
const title = util.format(

packages/jest-cli/src/test_scheduler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export default class TestScheduler {
254254
this.addReporter(new CoverageReporter(this._globalConfig));
255255
}
256256

257-
if (notify !== "false") {
257+
if (notify !== 'false') {
258258
this.addReporter(
259259
new NotifyReporter(this._globalConfig, this._options.startRun),
260260
);

packages/jest-config/src/defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default ({
5050
moduleNameMapper: {},
5151
modulePathIgnorePatterns: [],
5252
noStackTrace: false,
53-
notify: "false",
53+
notify: 'false',
5454
preset: null,
5555
resetMocks: false,
5656
resetModules: false,

packages/jest-config/src/valid_config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default ({
5757
modulePaths: ['/shared/vendor/modules'],
5858
name: 'string',
5959
noStackTrace: false,
60-
notify: "false",
60+
notify: 'false',
6161
onlyChanged: false,
6262
preset: 'react-native',
6363
projects: ['project-a', 'project-b/'],

packages/jest-validate/src/__tests__/fixtures/jest_config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const defaultConfig = {
3838
moduleNameMapper: {},
3939
modulePathIgnorePatterns: [],
4040
noStackTrace: false,
41-
notify: "false",
41+
notify: 'false',
4242
preset: null,
4343
resetMocks: false,
4444
resetModules: false,
@@ -94,7 +94,7 @@ const validConfig = {
9494
modulePaths: ['/shared/vendor/modules'],
9595
name: 'string',
9696
noStackTrace: false,
97-
notify: "false",
97+
notify: 'false',
9898
preset: 'react-native',
9999
resetMocks: false,
100100
resetModules: false,

test_utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const DEFAULT_GLOBAL_CONFIG: GlobalConfig = {
3636
noSCM: null,
3737
noStackTrace: false,
3838
nonFlagArgs: [],
39-
notify: "false",
39+
notify: 'false',
4040
onlyChanged: false,
4141
onlyFailures: false,
4242
outputFile: null,

0 commit comments

Comments
 (0)