Skip to content

Commit

Permalink
test: fix "excluded dep in included dep" test (#18999)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red authored Dec 18, 2024
1 parent 2b4f115 commit 3e4caab
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions playground/nested-deps/__tests__/nested-deps.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ test('handle nested package', async () => {
expect(await page.textContent('.side-c')).toBe(c)
expect(await page.textContent('.d')).toBe('D@1.0.0')
expect(await page.textContent('.nested-d')).toBe('D-nested@1.0.0')
// TODO: Review if the test is correct
// expect(await page.textContent('.nested-e')).toBe('1')
expect(await page.textContent('.nested-e')).toBe('1')

expect(await page.textContent('.absolute-f')).toBe('F@2.0.0')
expect(await page.textContent('.self-referencing')).toBe('true')
Expand Down
4 changes: 2 additions & 2 deletions playground/nested-deps/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h2>self referencing</h2>
import C from '@vitejs/test-package-c'
import { C as sideC } from '@vitejs/test-package-c/side'
import D, { nestedD } from '@vitejs/test-package-d'
// import { testExcluded } from '@vitejs/test-package-e'
import { testExcluded } from '@vitejs/test-package-e'
import F from '__F_ABSOLUTE_PACKAGE_PATH__'
import { isSelfReference } from '@vitejs/self-referencing/test'

Expand All @@ -47,7 +47,7 @@ <h2>self referencing</h2>
text('.d', D)
text('.nested-d', nestedD)

// text('.nested-e', testExcluded())
text('.nested-e', testExcluded())

text('.absolute-f', F)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { testExcluded } from 'test-package-e-excluded'
import { testExcluded } from '@vitejs/test-package-e-excluded'

export function testIncluded() {
return testExcluded()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"type": "module",
"main": "index.js",
"dependencies": {
"test-package-e-excluded": "link:../test-package-e-excluded"
"@vitejs/test-package-e-excluded": "link:../test-package-e-excluded"
}
}
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3e4caab

Please sign in to comment.