Skip to content

Commit 7a3b561

Browse files
committed
Merge branch 'master' of https://github.com/reduxjs/react-redux into add-size-limit
2 parents 9280d73 + 822f5c9 commit 7a3b561

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/test.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,11 @@ jobs:
7777
run: yarn add ./package.tgz
7878

7979
- name: Erase path aliases
80-
run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.mts
80+
run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json
8181

8282
- name: Test types
83+
env:
84+
TEST_DIST: true
8385
run: |
8486
yarn tsc --version
8587
yarn type-tests
@@ -264,7 +266,9 @@ jobs:
264266
run: yarn add ./package.tgz
265267

266268
- name: Erase path aliases
267-
run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.mts
269+
run: sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json
268270

269271
- name: Run local tests against the build artifact
272+
env:
273+
TEST_DIST: true
270274
run: yarn test

vitest.config.mts

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ export default defineConfig({
66
setupFiles: ['test/setup.ts'],
77
globals: true,
88
alias: {
9-
'react-redux': new URL('src/index.ts', import.meta.url).pathname, // @remap-prod-remove-line
9+
'react-redux': new URL(
10+
process.env.TEST_DIST ? 'node_modules/react-redux' : 'src/index.ts',
11+
import.meta.url,
12+
).pathname,
1013
// this mapping is disabled as we want `dist` imports in the tests only to be used for "type-only" imports which don't play a role for jest
1114
'@internal': new URL('src', import.meta.url).pathname,
1215
},

0 commit comments

Comments
 (0)