Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove p-each-series dep #11903

Merged
merged 6 commits into from Sep 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions e2e/__tests__/__snapshots__/coverageHandlebars.test.ts.snap
Expand Up @@ -4,7 +4,7 @@ exports[`code coverage for Handlebars 1`] = `
-----------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-----------|---------|----------|---------|---------|-------------------
All files | 75 | 66.67 | 66.67 | 66.67 |
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷

greet.hbs | 75 | 66.67 | 66.67 | 66.67 | 10
All files | 75 | 66.66 | 66.66 | 66.66 |
greet.hbs | 75 | 66.66 | 66.66 | 66.66 | 10
-----------|---------|----------|---------|---------|-------------------
`;
12 changes: 6 additions & 6 deletions e2e/__tests__/__snapshots__/coverageProviderV8.test.ts.snap
Expand Up @@ -10,7 +10,7 @@ exports[`on node >=12.16.0 prints correct coverage report, if a TS module is tra
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------|---------|----------|---------|---------|-------------------
All files | 50 | 25 | 25 | 50 |
module.ts | 80.77 | 50 | 50 | 80.77 | 16-18,21-22
module.ts | 80.76 | 50 | 50 | 80.76 | 16-18,21-22
types.ts | 0 | 0 | 0 | 0 | 1-8
uncovered.ts | 0 | 0 | 0 | 0 | 1-8
--------------|---------|----------|---------|---------|-------------------
Expand All @@ -25,8 +25,8 @@ exports[`on node >=12.16.0 prints correct coverage report, if an ESM module is p
--------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------|---------|----------|---------|---------|-------------------
All files | 59.38 | 50 | 33.33 | 59.38 |
module.js | 79.17 | 66.67 | 50 | 79.17 | 14-16,19-20
All files | 59.37 | 50 | 33.33 | 59.37 |
module.js | 79.16 | 66.66 | 50 | 79.16 | 14-16,19-20
uncovered.js | 0 | 0 | 0 | 0 | 1-8
--------------|---------|----------|---------|---------|-------------------
`;
Expand All @@ -40,8 +40,8 @@ exports[`prints correct coverage report, if a CJS module is put under test witho
--------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------|---------|----------|---------|---------|-------------------
All files | 59.38 | 60 | 50 | 59.38 |
module.js | 79.17 | 75 | 66.67 | 79.17 | 14-16,19-20
All files | 59.37 | 60 | 50 | 59.37 |
module.js | 79.16 | 75 | 66.66 | 79.16 | 14-16,19-20
uncovered.js | 0 | 0 | 0 | 0 | 1-8
--------------|---------|----------|---------|---------|-------------------
`;
Expand All @@ -56,7 +56,7 @@ exports[`prints correct coverage report, if a TS module is transpiled by Babel t
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------|---------|----------|---------|---------|-------------------
All files | 50 | 25 | 25 | 50 |
module.ts | 80.77 | 50 | 50 | 80.77 | 16-18,21-22
module.ts | 80.76 | 50 | 50 | 80.76 | 16-18,21-22
types.ts | 0 | 0 | 0 | 0 | 1-8
uncovered.ts | 0 | 0 | 0 | 0 | 1-8
--------------|---------|----------|---------|---------|-------------------
Expand Down
8 changes: 4 additions & 4 deletions e2e/__tests__/__snapshots__/coverageReport.test.ts.snap
Expand Up @@ -47,7 +47,7 @@ exports[`generates coverage when using the testRegex config param 1`] = `
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------------------------------|---------|----------|---------|---------|-------------------
All files | 60 | 0 | 50 | 60 |
coverage-report | 47.37 | 0 | 25 | 50 |
coverage-report | 47.36 | 0 | 25 | 50 |
file.js | 100 | 100 | 100 | 100 |
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19
otherFile.js | 100 | 100 | 100 | 100 |
Expand All @@ -73,7 +73,7 @@ exports[`outputs coverage report 1`] = `
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------------------------------|---------|----------|---------|---------|-------------------
All files | 60 | 0 | 50 | 60 |
coverage-report | 47.37 | 0 | 25 | 50 |
coverage-report | 47.36 | 0 | 25 | 50 |
file.js | 100 | 100 | 100 | 100 |
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19
otherFile.js | 100 | 100 | 100 | 100 |
Expand All @@ -98,7 +98,7 @@ Lines : 60% ( 12/20 )
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------------------------------|---------|----------|---------|---------|-------------------
All files | 60 | 0 | 50 | 60 |
coverage-report | 47.37 | 0 | 25 | 50 |
coverage-report | 47.36 | 0 | 25 | 50 |
file.js | 100 | 100 | 100 | 100 |
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19
otherFile.js | 100 | 100 | 100 | 100 |
Expand All @@ -116,7 +116,7 @@ exports[`outputs coverage report when text is requested 1`] = `
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------------------------------|---------|----------|---------|---------|-------------------
All files | 60 | 0 | 50 | 60 |
coverage-report | 47.37 | 0 | 25 | 50 |
coverage-report | 47.36 | 0 | 25 | 50 |
file.js | 100 | 100 | 100 | 100 |
notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19
otherFile.js | 100 | 100 | 100 | 100 |
Expand Down
2 changes: 1 addition & 1 deletion e2e/__tests__/workerForceExit.test.ts
Expand Up @@ -69,5 +69,5 @@ test('force exits a worker that fails to exit gracefully', async () => {

const [pid] = execRes!;

expect(await findProcess('pid', pid)).toHaveLength(0);
expect(await findProcess('pid', Number(pid))).toHaveLength(0);
});
2 changes: 1 addition & 1 deletion examples/angular/package.json
Expand Up @@ -13,7 +13,7 @@
"@angular/platform-browser": "^12.0.0",
"@angular/platform-browser-dynamic": "^12.0.0",
"core-js": "^3.2.1",
"rxjs": "^6.5.3",
"rxjs": "^7.3.0",
"tslib": "^2.0.0",
"typescript": "*",
"zone.js": "~0.11.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-cli/package.json
Expand Up @@ -21,7 +21,7 @@
"jest-util": "^27.2.3",
"jest-validate": "^27.2.3",
"prompts": "^2.0.1",
"yargs": "^16.0.3"
"yargs": "^16.2.0"
},
"devDependencies": {
"@jest/test-utils": "^27.2.3",
Expand Down
1 change: 0 additions & 1 deletion packages/jest-core/package.json
Expand Up @@ -34,7 +34,6 @@
"jest-validate": "^27.2.3",
"jest-watcher": "^27.2.3",
"micromatch": "^4.0.4",
"p-each-series": "^2.1.0",
"rimraf": "^3.0.0",
"slash": "^3.0.0",
"strip-ansi": "^6.0.0"
Expand Down
9 changes: 3 additions & 6 deletions packages/jest-core/src/runGlobalHook.ts
Expand Up @@ -6,7 +6,6 @@
*/

import * as util from 'util';
import pEachSeries = require('p-each-series');
import type {Test} from '@jest/test-result';
import {createScriptTransformer} from '@jest/transform';
import type {Config} from '@jest/types';
Expand All @@ -30,9 +29,9 @@ export default async ({
}

if (globalModulePaths.size > 0) {
await pEachSeries(globalModulePaths, async modulePath => {
for (const modulePath of globalModulePaths) {
if (!modulePath) {
return;
continue;
}

const correctConfig = allTests.find(
Expand Down Expand Up @@ -73,8 +72,6 @@ export default async ({
)}`,
);
}
});
}
}

return Promise.resolve();
};
2 changes: 1 addition & 1 deletion packages/jest-repl/package.json
Expand Up @@ -26,7 +26,7 @@
"jest-util": "^27.2.3",
"jest-validate": "^27.2.3",
"repl": "^0.1.3",
"yargs": "^16.0.3"
"yargs": "^16.2.0"
},
"devDependencies": {
"@jest/test-utils": "^27.2.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-runtime/package.json
Expand Up @@ -40,7 +40,7 @@
"jest-validate": "^27.2.3",
"slash": "^3.0.0",
"strip-bom": "^4.0.0",
"yargs": "^16.0.3"
"yargs": "^16.2.0"
},
"devDependencies": {
"@jest/test-utils": "^27.2.3",
Expand Down