-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Distribute integration test to single test files #455
Changes from all commits
b144164
b53f7ea
b9b4d97
ce4e737
040042e
4a2cad6
f10ab62
76e25dc
1284b60
2b1998e
4a5ba85
072cb95
4a1de65
b2c367f
0071760
8376366
fffdd21
6e7267a
1ac54a4
bb282ae
e14c1d9
439bf6e
d711f84
6dd216d
c62a3f6
6a0bcdd
f83e725
38cb3ea
d8d971c
546ccdd
b06db21
6827ce3
6c4ea5f
fd98787
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { createIntegrationTest, assertContainFiles } from '../utils' | ||
|
||
describe('integration', () => { | ||
test(`basic-jsx`, async () => { | ||
await createIntegrationTest( | ||
{ | ||
directory: __dirname, | ||
}, | ||
({ distDir, stderr, stdout }) => { | ||
expect(stderr + stdout).not.toContain('(swc plugin)') | ||
assertContainFiles(distDir, ['index.js', 'index.mjs']) | ||
}, | ||
) | ||
}) | ||
}) |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { readFile } from 'fs/promises' | ||
import { createIntegrationTest, deleteFile, existsFile } from '../../utils' | ||
|
||
afterEach(async () => { | ||
await deleteFile(`${__dirname}/fixtures/tsconfig.json`) | ||
}) | ||
|
||
describe('integration', () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. better to use different names, like "integration - cts" for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it! Do you want me to resolve it on this PR or other? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ye not blocking, can follow up later! |
||
test(`bin/cts`, async () => { | ||
await createIntegrationTest( | ||
{ | ||
directory: __dirname, | ||
}, | ||
async ({ distDir }) => { | ||
const distFiles = [ | ||
`${distDir}/bin/index.cjs`, | ||
`${distDir}/bin/index.d.cts`, | ||
] | ||
|
||
for (const distFile of distFiles) { | ||
expect(await existsFile(distFile)).toBe(true) | ||
} | ||
|
||
expect(await readFile(distFiles[0], 'utf-8')).toContain( | ||
'#!/usr/bin/env node', | ||
) | ||
}, | ||
) | ||
}) | ||
}) |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we probably don't need it here, for single test