test: multiple entry with the same base name

This commit is contained in:
EGOIST 2021-11-17 14:09:58 +08:00
parent d079b9b1c4
commit 795d065eae

View File

@ -1030,3 +1030,22 @@ test('esbuild metafile', async () => {
]
`)
})
test('multiple entry with the same base name', async () => {
const { outFiles } = await run(
getTestName(),
{
'src/input.ts': `export const foo = 1`,
'src/bar/input.ts': `export const bar = 2`,
},
{
entry: ['src/input.ts', 'src/bar/input.ts'],
}
)
expect(outFiles).toMatchInlineSnapshot(`
Array [
"bar/input.js",
"input.js",
]
`)
})