diff --git a/.github/workflows/build-and-test-types.yml b/.github/workflows/build-and-test-types.yml index 0d599965a..b81dceee6 100644 --- a/.github/workflows/build-and-test-types.yml +++ b/.github/workflows/build-and-test-types.yml @@ -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 @@ -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 diff --git a/vitest.config.mts b/vitest.config.mts index 6bd6667aa..f0d43ab31 100644 --- a/vitest.config.mts +++ b/vitest.config.mts @@ -1,13 +1,13 @@ 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, @@ -15,4 +15,4 @@ export default defineConfig(({ mode }) => ({ '@internal': new URL('src', import.meta.url).pathname } } -})) +})