Skip to content

Commit

Permalink
chore(linting): no-unused-vars
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed May 4, 2024
1 parent 2af6fe7 commit 98057a0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions test/check-engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ const e = (npm, node, _id = '[email protected]') => {
return { engines, _id }
}

t.test('no engine', async t =>
t.test('no engine', async () =>
checkEngine({}, '1.3.2', '0.2.1'))

t.test('empty engine object', async t =>
t.test('empty engine object', async () =>
checkEngine(e(), '1.1.2', '0.2.1'))

t.test('node version too old', async t =>
Expand All @@ -30,22 +30,22 @@ t.test('npm version too old', async t =>
code: 'EBADENGINE',
}))

t.test('force node version too old', async t =>
t.test('force node version too old', async () =>
checkEngine(e(null, '0.1.0', '[email protected]'), '1.3.2', '0.2.1', true))

t.test('cannot force when npm version too old', async t =>
t.throws(() => checkEngine(e('^1.4.6', null, '[email protected]'), '1.3.2', '0.2.1'), {
code: 'EBADENGINE',
}))

t.test('npm prerelease', async t =>
t.test('npm prerelease', async () =>
checkEngine(e('>=1.2.3', '>=0.8'), '69.420.0-yolo', '69.420.0-yolo'))

t.test('node prerelease', async t =>
t.test('node prerelease', async () =>
checkEngine(e('>=1.2.3', '>=0.8'), '1.2.3', '69.420.0-yolo'))

t.test('no node version', async t =>
t.test('no node version', async () =>
checkEngine(e('>=1.2.3', '>=0.8'), '1.2.3', null))

t.test('no npm version', async t =>
t.test('no npm version', async () =>
checkEngine(e('>=1.2.3', '>=0.8'), null, '1.2.3'))
14 changes: 7 additions & 7 deletions test/check-platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ t.test('os wrong', async t =>
os: 'enten-os',
}), { code: 'EBADPLATFORM' }))

t.test('nothing wrong', async t =>
t.test('nothing wrong', async () =>
checkPlatform({ cpu: 'any', os: 'any' }))

t.test('force', async t =>
t.test('force', async () =>
checkPlatform({ cpu: 'enten-cpu', os: 'any' }, true))

t.test('no opinions', async t =>
t.test('no opinions', async () =>
checkPlatform({}))

t.test('only target cpu wrong', async t =>
Expand All @@ -40,26 +40,26 @@ t.test('os wrong (negation)', async t =>
os: '!' + process.platform,
}), { code: 'EBADPLATFORM' }))

t.test('nothing wrong (negation)', async t =>
t.test('nothing wrong (negation)', async () =>
checkPlatform({ cpu: '!enten-cpu', os: '!enten-os' }))

t.test('nothing wrong with overridden os', async t =>
t.test('nothing wrong with overridden os', async () =>
checkPlatform({
cpu: 'any',
os: 'enten-os',
}, false, {
os: 'enten-os',
}))

t.test('nothing wrong with overridden cpu', async t =>
t.test('nothing wrong with overridden cpu', async () =>
checkPlatform({
cpu: 'enten-cpu',
os: 'any',
}, false, {
cpu: 'enten-cpu',
}))

t.test('nothing wrong with overridden libc', async t =>
t.test('nothing wrong with overridden libc', async () =>
checkPlatform({
cpu: 'enten-cpu',
libc: 'enten-libc',
Expand Down

0 comments on commit 98057a0

Please sign in to comment.