Skip to content

Commit

Permalink
test: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuslundgard committed Sep 8, 2022
1 parent 8bb80a1 commit cd5db32
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ test('should build `custom-dist` package', async () => {

await project.install()
await project.add(__ROOT__)
const buildLog = await project.run('build')
const {stdout} = await project.run('build')

expect(buildLog.stdout).toContain(' ./lib/index.cjs')
expect(buildLog.stdout).toContain(' ./lib/index.js')
expect(buildLog.stdout).toContain(' ./lib/index.d.ts')
expect(stdout).toContain('./src/index.ts -> ./lib/index.cjs')
expect(stdout).toContain('./src/index.ts -> ./lib/index.js')
expect(stdout).toContain('./src/index.ts -> ./lib/index.d.ts')

expect(await project.readFile('lib/index.cjs')).toMatchSnapshot()
expect(await project.readFile('lib/index.js')).toMatchSnapshot()
Expand All @@ -27,11 +27,11 @@ test('should build `multi-export` package', async () => {

await project.install()
await project.add(__ROOT__)
const buildLog = await project.run('build')
const {stdout} = await project.run('build')

expect(buildLog.stdout).toContain(' ./dist/index.cjs')
expect(buildLog.stdout).toContain(' ./dist/index.js')
expect(buildLog.stdout).toContain(' ./dist/index.d.ts')
expect(stdout).toContain('./src/index.ts -> ./dist/index.cjs')
expect(stdout).toContain('./src/index.ts -> ./dist/index.js')
expect(stdout).toContain('./src/index.ts -> ./dist/index.d.ts')

expect(await project.readFile('dist/index.cjs')).toMatchSnapshot()
expect(await project.readFile('dist/index.js')).toMatchSnapshot()
Expand Down

0 comments on commit cd5db32

Please sign in to comment.