Skip to content

Commit

Permalink
Remove jest-mock dev dep (#1015)
Browse files Browse the repository at this point in the history
  • Loading branch information
ecraig12345 authored Nov 25, 2024
1 parent 8158324 commit 015c830
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
7 changes: 7 additions & 0 deletions change/beachball-d0b88f44-aa23-4ab8-9baf-35466cb0ac7f.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Remove jest-mock dev dep",
"packageName": "beachball",
"email": "[email protected]",
"dependentChangeType": "none"
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
"get-port": "^5.0.0",
"husky": "^8.0.0",
"jest": "^29.0.0",
"jest-mock": "^29.0.0",
"lint-staged": "^12.0.0",
"normalized-tmpdir": "^1.0.1",
"prettier": "~2.8.4",
Expand Down
3 changes: 1 addition & 2 deletions src/__fixtures__/mockLogs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { jest, afterEach, beforeAll, afterAll } from '@jest/globals';
import type { SpyInstance } from 'jest-mock';

/** Methods that will be mocked. More could be added later if needed. */
type MockLogMethod = 'log' | 'warn' | 'error';
Expand All @@ -15,7 +14,7 @@ type MockLogsOptions = {

export type MockLogs = {
/** Mocked methods (to access calls etc) */
mocks: { [k in MockLogMethod]: SpyInstance<typeof console.log> };
mocks: { [k in MockLogMethod]: jest.SpiedFunction<typeof console.log> };

/** Set override options for one test only */
setOverrideOptions: (options: MockLogsOptions) => void;
Expand Down
3 changes: 1 addition & 2 deletions src/__tests__/publish/tagPackages.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { describe, expect, it, jest, beforeEach, afterAll } from '@jest/globals';
import type { Mock } from 'jest-mock';
import { gitFailFast } from 'workspace-tools';
import { initMockLogs } from '../../__fixtures__/mockLogs';
import { tagPackages } from '../../publish/tagPackages';
Expand Down Expand Up @@ -62,7 +61,7 @@ describe('tagPackages', () => {
initMockLogs();

beforeEach(() => {
(gitFailFast as Mock).mockReset();
(gitFailFast as jest.Mock).mockReset();
});

afterAll(() => {
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2509,7 +2509,7 @@ jest-message-util@^29.7.0:
slash "^3.0.0"
stack-utils "^2.0.3"

jest-mock@^29.0.0, jest-mock@^29.7.0:
jest-mock@^29.7.0:
version "29.7.0"
resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347"
integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==
Expand Down

0 comments on commit 015c830

Please sign in to comment.