Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix tests that use testPathPatterns with subprojects
  • Loading branch information
brandonchinn178 committed Mar 7, 2024
commit 527de5ec193356ef97f60b9b95d56eb12fe436ca
2 changes: 1 addition & 1 deletion e2e/__tests__/executeTestsOnceInMpr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ test('Tests are executed only once even in an MPR', () => {
});
/* eslint-enable sort-keys */

const {stderr, exitCode} = runJest(DIR, ['foo/folder/my-test-bar.js']);
const {stderr, exitCode} = runJest(DIR, ['my-test-bar.js']);

expect(exitCode).toBe(0);

Expand Down
2 changes: 1 addition & 1 deletion e2e/__tests__/globalSetup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ test('should not call a globalSetup of a project if there are no tests to run fr

const result = runWithJson(e2eDir, [
`--config=${configPath}`,
'--testPathPatterns=project-1',
'--testPathPatterns=setup1',
Copy link
Member

Choose a reason for hiding this comment

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

right, since this is relative to the project config now, and not the global config. I'm afraid this will be quite breaking as well (when using jets projects just to have a single jest command to run from root rather than as a way to isolate test suites), but let's try! 🙂

]);

expect(result.exitCode).toBe(0);
Expand Down
2 changes: 1 addition & 1 deletion e2e/__tests__/globalTeardown.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ test('should not call a globalTeardown of a project if there are no tests to run

const result = runWithJson('global-teardown', [
`--config=${configPath}`,
'--testPathPatterns=project-1',
'--testPathPatterns=teardown1',
]);

expect(result.exitCode).toBe(0);
Expand Down