Skip to content

Commit

Permalink
test: test inline deps too
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Jan 16, 2025
1 parent 4920ae3 commit 0a6f843
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion test/config/test/default-conditions.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
import { expect, test } from 'vitest'
import { runVitest } from '../../test-utils'

test('correctly imports "module" dependency with default resolve.conditions', async () => {
test('"module" condition for external dep', async () => {
const { stderr } = await runVitest({
root: 'fixtures/default-conditions',
})

expect(stderr).toBe('')
})

test('"module" condition for inline dep', async () => {
const { stderr } = await runVitest({
root: 'fixtures/default-conditions',
server: {
deps: {
inline: ['@vitest/test-dep-conditions'],
},
},
})

expect(stderr).toBe('')
})

0 comments on commit 0a6f843

Please sign in to comment.