Skip to content

Commit

Permalink
test: fix filename test and manifest windows path test
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Nov 10, 2023
1 parent c2a750d commit f1b6f67
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe.runIf(isBuild)('build', () => {
const cssAssetEntry = manifest['global.css']
const scssAssetEntry = manifest['nested/blue.scss']
const imgAssetEntry = manifest['../images/logo.png']
const dirFooAssetEntry = manifest['../dynamic/foo.css'] // '\\' should not be used even on windows
const dirFooAssetEntry = manifest['../../dir/foo.css']
expect(htmlEntry.css.length).toEqual(1)
expect(htmlEntry.assets.length).toEqual(1)
expect(cssAssetEntry?.file).not.toBeUndefined()
Expand All @@ -47,10 +47,9 @@ describe.runIf(isBuild)('build', () => {
expect(scssAssetEntry?.isEntry).toEqual(true)
expect(imgAssetEntry?.file).not.toBeUndefined()
expect(imgAssetEntry?.isEntry).toBeUndefined()
expect(dirFooAssetEntry).not.toBeUndefined()
expect(dirFooAssetEntry).not.toBeUndefined() // '\\' should not be used even on windows
// use the entry name
expect(manifest['bar.css']).not.toBeUndefined()
expect(manifest['foo.css']).toBeUndefined()
expect(dirFooAssetEntry.file).toMatch('assets/bar-')
})
})

Expand Down
2 changes: 1 addition & 1 deletion playground/backend-integration/dir/foo.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.entry-name-foo {
.windows-path-foo {
color: blue;
}
3 changes: 0 additions & 3 deletions playground/backend-integration/frontend/dynamic/foo.css

This file was deleted.

1 change: 0 additions & 1 deletion playground/backend-integration/frontend/dynamic/foo.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'vite/modulepreload-polyfill'
import('../dynamic/foo') // should be dynamic import to split chunks

export const colorClass = 'text-black'

Expand Down

0 comments on commit f1b6f67

Please sign in to comment.