Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaemami59 committed Jun 21, 2024
1 parent cdfd494 commit 492bf78
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build-and-test-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ jobs:
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 @@ -230,4 +232,6 @@ jobs:
run: sed -i -e /@remap-prod-remove-line/d tsconfig.base.json

- name: Run local tests against the build artifact
run: yarn test --mode test-ci
env:
TEST_DIST: true
run: yarn test
6 changes: 3 additions & 3 deletions vitest.config.mts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { defineConfig } from 'vitest/config'

export default defineConfig(({ mode }) => ({
export default defineConfig({
test: {
watch: false,
globals: true,
setupFiles: ['test/setup.ts'],
alias: {
reselect: new URL(
mode === 'test-ci' ? 'node_modules/reselect' : 'src/index.ts',
process.env.TEST_DIST ? 'node_modules/reselect' : '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
}
}
}))
})

0 comments on commit 492bf78

Please sign in to comment.