Skip to content

Commit

Permalink
Clean up test from old version checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Nov 11, 2023
1 parent 8efedf8 commit 27727eb
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions packages/size-limit/test/run.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ vi.mock('nanospinner', () => {

const TMP_DIR = /size-limit-[\w-]+\/?/g
const ROOT = join(__dirname, '..', '..', '..')
const NODE_VERSION = parseInt(process.version.slice(1))

function fixture(...files) {
return join(ROOT, 'fixtures', ...files)
Expand Down Expand Up @@ -272,7 +271,7 @@ it('works in integration test with size', async () => {
expect(await check('integration')).toMatchSnapshot()
})

it.skipIf(NODE_VERSION < 16)('works in integration test with ESM', async () => {
it('works in integration test with ESM', async () => {
await checkJson('integration-esm', [
{
name: 'index.js',
Expand All @@ -289,7 +288,7 @@ it.skipIf(NODE_VERSION < 16)('works in integration test with ESM', async () => {
])
})

it.skipIf(NODE_VERSION < 16)('works in integration test with ESM', async () => {
it('works in integration test with ESM', async () => {
await checkJson('integration-esm', [
{
name: 'index.js',
Expand Down Expand Up @@ -370,16 +369,13 @@ it('returns zero for empty file with esbuild and without gzip', async () => {
expect(await check('zero-esbuild-non-gzip')).toMatchSnapshot()
})

it.skipIf(NODE_VERSION < 16)(
'allows to use peer dependencies in import',
async () => {
await checkJson('combine', [
{ name: 'all', size: 2273 },
{ name: 'a', size: 1 },
{ name: 'redux', size: 2270 }
])
}
)
it('allows to use peer dependencies in import', async () => {
await checkJson('combine', [
{ name: 'all', size: 2273 },
{ name: 'a', size: 1 },
{ name: 'redux', size: 2270 }
])
})

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

0 comments on commit 27727eb

Please sign in to comment.