Skip to content

Commit

Permalink
test: add test for checking partial specified dual entries (#594)
Browse files Browse the repository at this point in the history
Co-authored-by: Jiachi Liu <[email protected]>
  • Loading branch information
himself65 and huozhi authored Nov 24, 2024
1 parent d8e757d commit b1a2aaf
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/integration/duplicate-entries-partial-specified/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { createIntegrationTest, getFileNamesFromDirectory } from '../utils'

describe('integration duplicate-entries-partial-specified', () => {
it('should not generate js types paths if not specified', async () => {
await createIntegrationTest(
{
directory: __dirname,
},
async ({ distDir }) => {
expect(await getFileNamesFromDirectory(distDir)).toEqual([
'a.js',
'a.workerd.js',
])
},
)
})
})
10 changes: 10 additions & 0 deletions test/integration/duplicate-entries-partial-specified/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "undefined-types-paths",
"type": "module",
"exports": {
"./a": {
"workerd": "./dist/a.workerd.js",
"import": "./dist/a.js"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { internal } from './a/shared'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { internal } from './a/shared'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const internal = 'a'

0 comments on commit b1a2aaf

Please sign in to comment.