From 86aa01d474f48f2808a8bd2abb45cc8648b0e8be Mon Sep 17 00:00:00 2001 From: Bruno Imbrizi Date: Wed, 31 May 2023 15:59:12 +0100 Subject: [PATCH] test: add empty dest tests --- test/fixtures/vite.noflatten.config.ts | 14 +++++++++++++- test/testcases.ts | 15 +++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/test/fixtures/vite.noflatten.config.ts b/test/fixtures/vite.noflatten.config.ts index 26b97c1..8c0bd67 100644 --- a/test/fixtures/vite.noflatten.config.ts +++ b/test/fixtures/vite.noflatten.config.ts @@ -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 }) diff --git a/test/testcases.ts b/test/testcases.ts index 21adae2..bccbcf5 100644 --- a/test/testcases.ts +++ b/test/testcases.ts @@ -146,6 +146,21 @@ export const testcases: Record = { 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' } ] }