Skip to content

Commit 2f7ee04

Browse files
committed
fix: jest warnings
1 parent 01c94c7 commit 2f7ee04

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: pnpm install
2929

3030
- name: Run the tests
31-
run: pnpm test -- --coverage
31+
run: pnpm run test:coverage
3232

3333
- name: Upload coverage to Codecov
3434
uses: codecov/codecov-action@v1

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
run: pnpm lint
4343

4444
- name: Test
45-
run: pnpm test -- --ci --coverage --maxWorkers=2
45+
run: pnpm run test:coverage -- --ci --maxWorkers=2
4646

4747
- name: Build
4848
run: pnpm build

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"start": "tsdx watch",
3232
"build": "tsdx build",
3333
"test": "tsdx test --passWithNoTests",
34+
"test:coverage": "tsdx test --passWithNoTests --coverage",
3435
"prettier": "prettier ./ --write",
3536
"lint": "tsdx lint",
3637
"prepare": "tsdx build",
@@ -53,7 +54,6 @@
5354
"package.json",
5455
"/stories/"
5556
],
56-
"collectCoverage": true,
5757
"testURL": "http://localhost",
5858
"setupFiles": [
5959
"<rootDir>/src/setupTests.ts"

src/setupTests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
global.ResizeObserver = jest.fn().mockImplementation(() => ({
1+
(global as any).ResizeObserver = jest.fn().mockImplementation(() => ({
22
observe: jest.fn(),
33
unobserve: jest.fn(),
44
disconnect: jest.fn(),

0 commit comments

Comments
 (0)