Skip to content

Commit f5ffebb

Browse files
committed
Fix CI
1 parent c3194c6 commit f5ffebb

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/build-and-test-types.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,11 @@ jobs:
8484
# Remove config line that points "reselect" to the `src` folder,
8585
# so that the typetest will use the installed version instead
8686
- name: Erase path aliases
87-
run: sed -i -e /@remap-prod-remove-line/d tsconfig.base.json vitest.config.mts
87+
run: sed -i -e /@remap-prod-remove-line/d tsconfig.base.json
8888

8989
- name: Test types
90+
env:
91+
TEST_DIST: true
9092
run: |
9193
yarn tsc --version
9294
yarn type-tests
@@ -227,7 +229,9 @@ jobs:
227229
run: yarn add ./package.tgz
228230

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

232234
- name: Run local tests against the build artifact
235+
env:
236+
TEST_DIST: true
233237
run: yarn test

vitest.config.mts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ export default defineConfig({
66
globals: true,
77
setupFiles: ['test/setup.ts'],
88
alias: {
9-
reselect: new URL('src/index.ts', import.meta.url).pathname, // @remap-prod-remove-line
9+
reselect: new URL(
10+
process.env.TEST_DIST ? 'node_modules/reselect' : 'src/index.ts',
11+
import.meta.url
12+
).pathname,
1013

1114
// 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
1215
'@internal': new URL('src', import.meta.url).pathname

0 commit comments

Comments
 (0)