diff --git a/test/integration/duplicate-entries-partial-specified/index.test.ts b/test/integration/duplicate-entries-partial-specified/index.test.ts new file mode 100644 index 00000000..8d983f12 --- /dev/null +++ b/test/integration/duplicate-entries-partial-specified/index.test.ts @@ -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', + ]) + }, + ) + }) +}) diff --git a/test/integration/duplicate-entries-partial-specified/package.json b/test/integration/duplicate-entries-partial-specified/package.json new file mode 100644 index 00000000..36620395 --- /dev/null +++ b/test/integration/duplicate-entries-partial-specified/package.json @@ -0,0 +1,10 @@ +{ + "name": "undefined-types-paths", + "type": "module", + "exports": { + "./a": { + "workerd": "./dist/a.workerd.js", + "import": "./dist/a.js" + } + } +} diff --git a/test/integration/duplicate-entries-partial-specified/src/a.ts b/test/integration/duplicate-entries-partial-specified/src/a.ts new file mode 100644 index 00000000..9c2840e2 --- /dev/null +++ b/test/integration/duplicate-entries-partial-specified/src/a.ts @@ -0,0 +1 @@ +export { internal } from './a/shared' diff --git a/test/integration/duplicate-entries-partial-specified/src/a.workerd.ts b/test/integration/duplicate-entries-partial-specified/src/a.workerd.ts new file mode 100644 index 00000000..9c2840e2 --- /dev/null +++ b/test/integration/duplicate-entries-partial-specified/src/a.workerd.ts @@ -0,0 +1 @@ +export { internal } from './a/shared' diff --git a/test/integration/duplicate-entries-partial-specified/src/a/shared.ts b/test/integration/duplicate-entries-partial-specified/src/a/shared.ts new file mode 100644 index 00000000..b13d8e9f --- /dev/null +++ b/test/integration/duplicate-entries-partial-specified/src/a/shared.ts @@ -0,0 +1 @@ +export const internal = 'a'