Skip to content

Commit 38bc0bb

Browse files
author
Szymon.Poltorak
committed
chore(testing): add logger mock to integration test setup files and update test expectations
1 parent cef39d3 commit 38bc0bb

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

packages/plugin-eslint/mocks/fixtures/nx-monorepo/package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

testing/test-setup-config/src/lib/vitest-setup-files.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const INT_TEST_SETUP_FILES = [
4040
'../../testing/test-setup/src/lib/console.mock.ts',
4141
'../../testing/test-setup/src/lib/reset.mocks.ts',
4242
'../../testing/test-setup/src/lib/chrome-path.mock.ts',
43+
'../../testing/test-setup/src/lib/logger.mock.ts',
4344
...CUSTOM_MATCHERS,
4445
] as const;
4546

testing/test-setup-config/src/lib/vitest-setup-files.unit.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ describe('vitest-setup-files', () => {
4242
});
4343

4444
describe('integration test setup files', () => {
45-
it('should return exactly 7 setup files with essential mocks and custom matchers', () => {
45+
it('should return exactly 8 setup files with essential mocks and custom matchers', () => {
4646
const setupFiles = getSetupFiles('int');
4747

48-
expect(setupFiles).toHaveLength(7);
48+
expect(setupFiles).toHaveLength(8);
4949
expect(setupFiles).toContain(
5050
'../../testing/test-setup/src/lib/console.mock.ts',
5151
);
@@ -55,6 +55,9 @@ describe('vitest-setup-files', () => {
5555
expect(setupFiles).toContain(
5656
'../../testing/test-setup/src/lib/chrome-path.mock.ts',
5757
);
58+
expect(setupFiles).toContain(
59+
'../../testing/test-setup/src/lib/logger.mock.ts',
60+
);
5861
});
5962

6063
it('should include custom matchers for integration tests', () => {

0 commit comments

Comments
 (0)