Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d45f6ef

Browse files
fix: jest ts
1 parent 8047dba commit d45f6ef

File tree

7 files changed

+38
-12
lines changed

7 files changed

+38
-12
lines changed

‎.github/workflows/coverage.yml‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
strategy:
1010
matrix:
11-
node-version: [12.x]
11+
node-version: [22.x]
1212

1313
steps:
1414
- name: Checkout repository
@@ -21,11 +21,14 @@ jobs:
2121
with:
2222
node-version: ${{ matrix.node-version }}
2323

24+
- name: Install PNPM
25+
run: npm install -g pnpm
26+
2427
- name: Install dependencies
25-
run: yarn install
28+
run: pnpm install
2629

2730
- name: Run the tests
28-
run: yarn test -- --coverage
31+
run: pnpm test -- --coverage
2932

3033
- name: Upload coverage to Codecov
3134
uses: codecov/codecov-action@v1

‎.github/workflows/main.yml‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ${{ matrix.os }}
88
strategy:
99
matrix:
10-
node: ['12.x']
10+
node: ['22.x']
1111
os: [ubuntu-latest, windows-latest, macOS-latest]
1212

1313
steps:
@@ -19,14 +19,17 @@ jobs:
1919
with:
2020
node-version: ${{ matrix.node }}
2121

22+
- name: Install PNPM
23+
run: npm install -g pnpm
24+
2225
- name: Install deps and build (with cache)
2326
uses: bahmutov/npm-install@v1
2427

2528
- name: Lint
26-
run: yarn lint
29+
run: pnpm lint
2730

2831
- name: Test
29-
run: yarn test --ci --coverage --maxWorkers=2
32+
run: pnpm test -- --ci --coverage --maxWorkers=2
3033

3134
- name: Build
32-
run: yarn build
35+
run: pnpm build

‎.github/workflows/size.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ jobs:
77
CI_JOB_NUMBER: 1
88
steps:
99
- uses: actions/checkout@v1
10+
- name: Install PNPM
11+
run: npm install -g pnpm
1012
- uses: andresz1/size-limit-action@v1
1113
with:
1214
github_token: ${{ secrets.GITHUB_TOKEN }}

‎.github/workflows/surge.yml‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
node-version: [12.x]
12+
node-version: [22.x]
1313

1414
steps:
1515
- name: Checkout repository
@@ -22,11 +22,14 @@ jobs:
2222
with:
2323
node-version: ${{ matrix.node-version }}
2424

25+
- name: Install PNPM
26+
run: npm install -g pnpm
27+
2528
- name: Install dependencies
26-
run: yarn install
29+
run: pnpm install
2730

2831
- name: Build Storybook
29-
run: yarn build-storybook
32+
run: pnpm build-storybook
3033

3134
- name: Install Surge
3235
run: npm install --global surge

‎documentation/src/components/parallax-route-update/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useEffect } from 'react';
2-
import { useLocation } from 'react-router-dom';
2+
import { useLocation } from '@docusaurus/router';
33
import { useParallaxController } from 'react-scroll-parallax';
44

55
function useUpdateControllerOnRouteChange() {

‎jest-setup.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
import'@testing-library/jest-dom';
1+
require('@testing-library/jest-dom');

‎package.json‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,21 @@
6060
],
6161
"setupFilesAfterEnv": [
6262
"<rootDir>/jest-setup.ts"
63+
],
64+
"transform": {
65+
"^.+\\.(ts|tsx)$": "ts-jest",
66+
"^.+\\.(js|jsx)$": "babel-jest"
67+
},
68+
"moduleFileExtensions": [
69+
"ts",
70+
"tsx",
71+
"js",
72+
"jsx",
73+
"json",
74+
"node"
75+
],
76+
"transformIgnorePatterns": [
77+
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$"
6378
]
6479
},
6580
"peerDependencies": {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /