This repository was archived by the owner on Oct 10, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-20
lines changed
Expand file tree Collapse file tree 2 files changed +4
-20
lines changed Original file line number Diff line number Diff 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 ,
Original file line number Diff line number Diff line change 1+ const { join } = require ( 'path' )
2+
13const test = require ( 'ava' )
24
35const { normalizePath, defaultFilter } = require ( './util' )
46
57test ( '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
2712test ( 'normalizePath should throw the error if name is invalid' , ( t ) => {
You can’t perform that action at this time.
0 commit comments