Skip to content

Commit

Permalink
Fix Node.js 12 and 14 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Jan 19, 2022
1 parent 08c78a4 commit 533bd2f
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions packages/size-limit/test/run.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,14 @@ describe(`run`, () => {
expect(await check('integration')).toMatchSnapshot()
})

it('works in integration test with ESM', async () => {
expect(await check('integration-esm')).toMatchSnapshot()
})
if (
!process.version.startsWith('v12.') &&
!process.version.startsWith('v14.')
) {
it('works in integration test with ESM', async () => {
expect(await check('integration-esm')).toMatchSnapshot()
})
}

it('works in integration test with time', async () => {
expect(await check('integration', ['--limit', '2s'])).toMatchSnapshot()
Expand Down Expand Up @@ -339,9 +344,11 @@ describe(`run`, () => {
expect(await check('zero-esbuild-non-gzip')).toMatchSnapshot()
})

it('allows to use peer dependencies in import', async () => {
expect(clean(await check('combine'))).toMatchSnapshot()
})
if (!process.version.startsWith('v12.')) {
it('allows to use peer dependencies in import', async () => {
expect(clean(await check('combine'))).toMatchSnapshot()
})
}

it('supports import and ignore for esbuild', async () => {
expect(clean(await check('peer-esbuild-non-gzip'))).toMatchSnapshot()
Expand Down

0 comments on commit 533bd2f

Please sign in to comment.