Skip to content

Commit

Permalink
test: add empty dest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoimbrizi committed May 31, 2023
1 parent 0041857 commit 86aa01d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
14 changes: 13 additions & 1 deletion test/fixtures/vite.noflatten.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,19 @@ export default defineConfig({
{
src: '../fixtures2/*.txt',
dest: 'fixture3'
}
},
{
src: 'foo.js',
dest: ''
},
{
src: 'noext',
dest: '.'
},
{
src: '../fixtures2/baz.txt',
dest: ''
},
],
flatten: false
})
Expand Down
15 changes: 15 additions & 0 deletions test/testcases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,21 @@ export const testcases: Record<string, Testcase[]> = {
name: 'glob with parent dir',
src: '../fixtures2/baz.txt',
dest: '/fixture3/fixtures2/baz.txt'
},
{
name: 'empty dest',
src: './foo.js',
dest: '/foo.js'
},
{
name: 'dot dest',
src: './noext',
dest: '/noext'
},
{
name: 'parent dir to empty dest',
src: '../fixtures2/baz.txt',
dest: '/fixtures2/baz.txt'
}
]
}

0 comments on commit 86aa01d

Please sign in to comment.