Skip to content

Commit

Permalink
fix: try running the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SamVerschueren committed Oct 7, 2021
1 parent e96b565 commit 0438e44
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
run: pnpm run build-plugin-react

- name: Test serve
run: pnpm run test-serve -- --runInBand
run: NODE_OPTIONS=--experimental-vm-modules pnpm run test-serve -- --runInBand

- name: Test build
run: pnpm run test-build -- --runInBand
Expand Down
11 changes: 7 additions & 4 deletions packages/vite/src/node/__tests__/utils.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { injectQuery, isWindows, dynamicImport } from '../utils'
import { resolve } from 'path'

if (isWindows) {
// this test will work incorrectly on unix systems
Expand Down Expand Up @@ -40,9 +41,11 @@ test('path with unicode, space, and %', () => {
})

test('dynamic import', async () => {
expect(await dynamicImport('./fixtures/vite.config.js')).toEqual({
default: {
plugins: []
}
const userConfig = (
await dynamicImport(resolve(__dirname, 'fixtures/vite.config.mjs'))
).default

expect(userConfig).toEqual({
plugins: []
})
})

0 comments on commit 0438e44

Please sign in to comment.