diff --git a/test/integration/basic-jsx/index.test.ts b/test/integration/basic-jsx/index.test.ts index 9977a461..91ec46e6 100644 --- a/test/integration/basic-jsx/index.test.ts +++ b/test/integration/basic-jsx/index.test.ts @@ -1,7 +1,7 @@ import { createIntegrationTest, assertContainFiles } from '../utils' -describe('integration', () => { - test(`basic-jsx`, async () => { +describe('integration basic-jsx', () => { + it('should work with basic JSX format', async () => { await createIntegrationTest( { directory: __dirname, diff --git a/test/integration/bin/cts/fixtures/.gitignore b/test/integration/bin/cts/fixtures/.gitignore new file mode 100644 index 00000000..15231cfe --- /dev/null +++ b/test/integration/bin/cts/fixtures/.gitignore @@ -0,0 +1 @@ +tsconfig.json diff --git a/test/integration/bin/cts/index.test.ts b/test/integration/bin/cts/index.test.ts index 562fc205..0628ca91 100644 --- a/test/integration/bin/cts/index.test.ts +++ b/test/integration/bin/cts/index.test.ts @@ -1,12 +1,8 @@ import { readFile } from 'fs/promises' -import { createIntegrationTest, deleteFile, existsFile } from '../../utils' +import { createIntegrationTest, existsFile } from '../../utils' -afterEach(async () => { - await deleteFile(`${__dirname}/fixtures/tsconfig.json`) -}) - -describe('integration', () => { - test(`bin/cts`, async () => { +describe('integration bin/cts', () => { + it('should work with bin as .cts extension', async () => { await createIntegrationTest( { directory: __dirname, diff --git a/test/integration/bin/multi-path/fixtures/.gitignore b/test/integration/bin/multi-path/fixtures/.gitignore new file mode 100644 index 00000000..15231cfe --- /dev/null +++ b/test/integration/bin/multi-path/fixtures/.gitignore @@ -0,0 +1 @@ +tsconfig.json diff --git a/test/integration/bin/multi-path/index.test.ts b/test/integration/bin/multi-path/index.test.ts index d344e334..13dc4b8b 100644 --- a/test/integration/bin/multi-path/index.test.ts +++ b/test/integration/bin/multi-path/index.test.ts @@ -1,12 +1,8 @@ import { readFile } from 'fs/promises' -import { createIntegrationTest, existsFile, deleteFile } from '../../utils' +import { createIntegrationTest, existsFile } from '../../utils' -afterEach(async () => { - await deleteFile(`${__dirname}/fixtures/tsconfig.json`) -}) - -describe('integration', () => { - test(`bin/multi-path`, async () => { +describe('integration bin/multi-path', () => { + it('should work with bin as multi path', async () => { await createIntegrationTest( { directory: __dirname, diff --git a/test/integration/bin/single-path/fixtures/.gitignore b/test/integration/bin/single-path/fixtures/.gitignore new file mode 100644 index 00000000..15231cfe --- /dev/null +++ b/test/integration/bin/single-path/fixtures/.gitignore @@ -0,0 +1 @@ +tsconfig.json diff --git a/test/integration/bin/single-path/index.test.ts b/test/integration/bin/single-path/index.test.ts index cf1724f6..d9a683a5 100644 --- a/test/integration/bin/single-path/index.test.ts +++ b/test/integration/bin/single-path/index.test.ts @@ -1,16 +1,8 @@ import { readFile } from 'fs/promises' -import { - createIntegrationTest, - assertContainFiles, - deleteFile, -} from '../../utils' +import { createIntegrationTest, assertContainFiles } from '../../utils' -afterEach(async () => { - await deleteFile(`${__dirname}/fixtures/tsconfig.json`) -}) - -describe('integration', () => { - test(`bin/single-path`, async () => { +describe('integration bin/single-path', () => { + it('should work with bin as single path', async () => { await createIntegrationTest( { directory: __dirname, diff --git a/test/integration/cjs-pkg-esm-main-field/index.test.ts b/test/integration/cjs-pkg-esm-main-field/index.test.ts index 2b3844f3..0fb1b707 100644 --- a/test/integration/cjs-pkg-esm-main-field/index.test.ts +++ b/test/integration/cjs-pkg-esm-main-field/index.test.ts @@ -1,7 +1,7 @@ import { createIntegrationTest } from '../utils' -describe('integration', () => { - test(`cjs-pkg-esm-main-field`, async () => { +describe('integration cjs-pkg-esm-main-field', () => { + it('should warn if main field with .mjs extension in CJS package', async () => { await createIntegrationTest( { directory: __dirname, diff --git a/test/integration/default-node-mjs/index.test.ts b/test/integration/default-node-mjs/index.test.ts index 897d2ec0..2fca424b 100644 --- a/test/integration/default-node-mjs/index.test.ts +++ b/test/integration/default-node-mjs/index.test.ts @@ -1,8 +1,8 @@ import { readFile } from 'fs/promises' import { createIntegrationTest, existsFile } from '../utils' -describe('integration', () => { - test(`default-node-mjs`, async () => { +describe('integration default-node-mjs', () => { + it('should work with .mjs extension', async () => { await createIntegrationTest( { directory: __dirname, diff --git a/test/integration/dev-prod-convention/fixtures/.gitignore b/test/integration/dev-prod-convention/fixtures/.gitignore new file mode 100644 index 00000000..15231cfe --- /dev/null +++ b/test/integration/dev-prod-convention/fixtures/.gitignore @@ -0,0 +1 @@ +tsconfig.json diff --git a/test/integration/dev-prod-convention/index.test.ts b/test/integration/dev-prod-convention/index.test.ts index 71312886..574448b3 100644 --- a/test/integration/dev-prod-convention/index.test.ts +++ b/test/integration/dev-prod-convention/index.test.ts @@ -1,11 +1,7 @@ -import { createIntegrationTest, assertFilesContent, deleteFile } from '../utils' +import { createIntegrationTest, assertFilesContent } from '../utils' -afterEach(async () => { - await deleteFile(`${__dirname}/fixtures/tsconfig.json`) -}) - -describe('integration', () => { - test(`dev-prod-convention`, async () => { +describe('integration dev-prod-convention', () => { + it('should work on optimize conventions dev and prod', async () => { await createIntegrationTest( { directory: __dirname, diff --git a/test/integration/duplicate-entry/index.test.ts b/test/integration/duplicate-entry/index.test.ts index 1229c432..3541b9a3 100644 --- a/test/integration/duplicate-entry/index.test.ts +++ b/test/integration/duplicate-entry/index.test.ts @@ -1,7 +1,7 @@ import { createIntegrationTest, assertContainFiles } from '../utils' -describe('integration', () => { - test(`duplicate-entry`, async () => { +describe('integration duplicate-entry', () => { + it('should deduplicate entries', async () => { await createIntegrationTest( { directory: __dirname, diff --git a/test/integration/edge-variable/index.test.ts b/test/integration/edge-variable/index.test.ts index 899d0714..92b322b1 100644 --- a/test/integration/edge-variable/index.test.ts +++ b/test/integration/edge-variable/index.test.ts @@ -1,7 +1,7 @@ import { createIntegrationTest, assertFilesContent } from '../utils' -describe('integration', () => { - test(`edge-variable`, async () => { +describe('integration edge-variable', () => { + it('should work with edge export condition', async () => { await createIntegrationTest( { directory: __dirname, diff --git a/test/integration/entry-index-index/index.test.ts b/test/integration/entry-index-index/index.test.ts index 8e05427c..c4228da8 100644 --- a/test/integration/entry-index-index/index.test.ts +++ b/test/integration/entry-index-index/index.test.ts @@ -1,7 +1,7 @@ import { createIntegrationTest, assertFilesContent } from '../utils' -describe('integration', () => { - test(`entry-index-index`, async () => { +describe('integration entry-index-index', () => { + it('should work with index file inside index directory', async () => { await createIntegrationTest( { directory: __dirname, diff --git a/test/integration/esm-pkg-cjs-main-field/index.test.ts b/test/integration/esm-pkg-cjs-main-field/index.test.ts index 8aef88e6..f34f0bac 100644 --- a/test/integration/esm-pkg-cjs-main-field/index.test.ts +++ b/test/integration/esm-pkg-cjs-main-field/index.test.ts @@ -1,7 +1,7 @@ import { createIntegrationTest, assertContainFiles } from '../utils' -describe('integration', () => { - test(`esm-pkg-cjs-main-field`, async () => { +describe('integration esm-pkg-cjs-main-field', () => { + it('should work with ESM package with CJS main field ', async () => { await createIntegrationTest( { directory: __dirname, diff --git a/test/integration/esm-shims/index.test.ts b/test/integration/esm-shims/index.test.ts index 7928c43d..bd6a4c94 100644 --- a/test/integration/esm-shims/index.test.ts +++ b/test/integration/esm-shims/index.test.ts @@ -1,7 +1,7 @@ import { createIntegrationTest, assertFilesContent } from '../utils' -describe('integration', () => { - test(`esm-shims`, async () => { +describe('integration esm-shims', () => { + it('should work with ESM shims', async () => { await createIntegrationTest( { directory: __dirname, diff --git a/test/integration/externals/index.test.ts b/test/integration/externals/index.test.ts index 71e35c36..d813cfd8 100644 --- a/test/integration/externals/index.test.ts +++ b/test/integration/externals/index.test.ts @@ -1,8 +1,8 @@ import { readFile } from 'fs/promises' import { createIntegrationTest } from '../utils' -describe('integration', () => { - test(`externals`, async () => { +describe('integration externals', () => { + it('should handle externals', async () => { await createIntegrationTest( { directory: __dirname, diff --git a/test/integration/invalid-exports-cjs/index.test.ts b/test/integration/invalid-exports-cjs/index.test.ts index 2fbad861..a0650f01 100644 --- a/test/integration/invalid-exports-cjs/index.test.ts +++ b/test/integration/invalid-exports-cjs/index.test.ts @@ -1,7 +1,7 @@ import { createIntegrationTest } from '../utils' -describe('integration', () => { - test(`invalid-exports-cjs`, async () => { +describe('integration invalid-exports-cjs', () => { + it('should warn on invalid exports as CJS', async () => { await createIntegrationTest( { directory: __dirname, diff --git a/test/integration/invalid-exports-esm/index.test.ts b/test/integration/invalid-exports-esm/index.test.ts index a27d6529..91bb9bac 100644 --- a/test/integration/invalid-exports-esm/index.test.ts +++ b/test/integration/invalid-exports-esm/index.test.ts @@ -1,7 +1,7 @@ import { createIntegrationTest } from '../utils' -describe('integration', () => { - test(`invalid-exports-esm`, async () => { +describe('integration invalid-exports-esm', () => { + it('should warn on invalid exports as ESM', async () => { await createIntegrationTest( { directory: __dirname, diff --git a/test/integration/js-only/index.test.ts b/test/integration/js-only/index.test.ts index 510035fd..91db4472 100644 --- a/test/integration/js-only/index.test.ts +++ b/test/integration/js-only/index.test.ts @@ -1,7 +1,7 @@ import { createIntegrationTest, existsFile } from '../utils' -describe('integration', () => { - test(`js-only`, async () => { +describe('integration js-only', () => { + it('should work with js only project', async () => { await createIntegrationTest( { directory: __dirname,