Skip to content
This repository was archived by the owner on Oct 10, 2022. It is now read-only.

Commit bc573ce

Browse files
committed
Simplify a unit test
1 parent 26be6aa commit bc573ce

File tree

2 files changed

+4
-20
lines changed

2 files changed

+4
-20
lines changed

.eslintrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ module.exports = {
2323
'fp/no-mutation': 0,
2424
'fp/no-this': 0,
2525
'node/global-require': 0,
26-
'node/prefer-global/process': 0,
2726
'promise/no-callback-in-promise': 0,
2827
'promise/prefer-await-to-callbacks': 0,
2928
'promise/prefer-await-to-then': 0,

src/deploy/util.test.js

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,12 @@
1+
const { join } = require('path')
2+
13
const test = require('ava')
24

35
const { normalizePath, defaultFilter } = require('./util')
46

57
test('normalizes relative file paths', (t) => {
6-
const cases = [
7-
{
8-
input: 'foo/bar/baz.js',
9-
expect: 'foo/bar/baz.js',
10-
msg: 'relative paths are normalized',
11-
skip: process.platform === 'win32',
12-
},
13-
{
14-
input: 'beep\\impl\\bbb',
15-
expect: 'beep/impl/bbb',
16-
msg: 'relative windows paths are normalized',
17-
skip: process.platform !== 'win32',
18-
},
19-
]
20-
21-
cases.forEach((c) => {
22-
if (c.skip) return
23-
t.is(normalizePath(c.input), c.expect, c.msg)
24-
})
8+
const input = join('foo', 'bar', 'baz.js')
9+
t.is(normalizePath(input), 'foo/bar/baz.js')
2510
})
2611

2712
test('normalizePath should throw the error if name is invalid', (t) => {

0 commit comments

Comments
 (0)