Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ jobs:
run: yarn add ./package.tgz

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

- name: Test types
env:
TEST_DIST: true
run: |
yarn tsc --version
yarn type-tests
Expand Down Expand Up @@ -264,7 +266,9 @@ jobs:
run: yarn add ./package.tgz

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

- name: Run local tests against the build artifact
env:
TEST_DIST: true
run: yarn test
5 changes: 4 additions & 1 deletion vitest.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ export default defineConfig({
setupFiles: ['test/setup.ts'],
globals: true,
alias: {
'react-redux': new URL('src/index.ts', import.meta.url).pathname, // @remap-prod-remove-line
'react-redux': new URL(
process.env.TEST_DIST ? 'node_modules/react-redux' : 'src/index.ts',
import.meta.url,
).pathname,
// 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
'@internal': new URL('src', import.meta.url).pathname,
},
Expand Down