Skip to content

Commit

Permalink
test: add multi out dir
Browse files Browse the repository at this point in the history
  • Loading branch information
devjiwonchoi committed Nov 18, 2023
1 parent e17f328 commit dc8816b
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,19 @@ const testCases: {
}
},
},
{
name: 'bin/multi-outdir',
args: [],
async expected(dir) {
const distFiles = [join(dir, './out/a.js'), join(dir, './dist/b.js')]

for (const distFile of distFiles) {
expect(await fs.readFile(distFile, 'utf-8')).toContain(
'#!/usr/bin/env node',
)
}
},
},
]

async function runBundle(
Expand Down
2 changes: 2 additions & 0 deletions test/integration/bin/multi-outdir/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
out/
6 changes: 6 additions & 0 deletions test/integration/bin/multi-outdir/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"bin": {
"a": "./out/a.js",
"b": "./dist/b.js"
}
}
2 changes: 2 additions & 0 deletions test/integration/bin/multi-outdir/src/a.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env node
console.log('a')
2 changes: 2 additions & 0 deletions test/integration/bin/multi-outdir/src/b.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env node
console.log('b')

0 comments on commit dc8816b

Please sign in to comment.