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

Commit d348981

Browse files
Karel-Kroezes-weigand
authored andcommitted
use double quotes for glob patterns
avoids early expansion and false negative test runs on some platforms, mostly mine.
1 parent 8bdef9a commit d348981

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/testCLI.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export function run() {
8484
})
8585

8686
test('files in (-i), files out (-o)', t => {
87-
execSync("node dist/src/cli.js -i './test/resources/MultiSchema/**/*.json' -o ./test/resources/MultiSchema/out")
87+
execSync(`node dist/src/cli.js -i "./test/resources/MultiSchema/**/*.json" -o ./test/resources/MultiSchema/out`)
8888

8989
readdirSync('./test/resources/MultiSchema/out').forEach(f => {
9090
const path = `./test/resources/MultiSchema/out/${f}`
@@ -96,12 +96,12 @@ export function run() {
9696
})
9797

9898
test('files in (-i), pipe out', t => {
99-
t.snapshot(execSync("node dist/src/cli.js -i './test/resources/MultiSchema/**/*.json'").toString())
99+
t.snapshot(execSync(`node dist/src/cli.js -i "./test/resources/MultiSchema/**/*.json"`).toString())
100100
})
101101

102102
test('files in (-i), files out (-o) nested dir does not exist', t => {
103103
execSync(
104-
"node dist/src/cli.js -i './test/resources/MultiSchema/**/*.json' -o ./test/resources/MultiSchema/foo/bar/out"
104+
`node dist/src/cli.js -i "./test/resources/MultiSchema/**/*.json" -o ./test/resources/MultiSchema/foo/bar/out`
105105
)
106106
readdirSync('./test/resources/MultiSchema/foo/bar/out').forEach(f => {
107107
const path = `./test/resources/MultiSchema/foo/bar/out/${f}`
@@ -114,7 +114,7 @@ export function run() {
114114

115115
test('files in (-i), files out (-o) matching nested dir', t => {
116116
execSync(
117-
"node dist/src/cli.js -i './test/resources/../../test/resources/MultiSchema2/' -o ./test/resources/MultiSchema2/out"
117+
`node dist/src/cli.js -i "./test/resources/../../test/resources/MultiSchema2/" -o ./test/resources/MultiSchema2/out`
118118
)
119119
getPaths('./test/resources/MultiSchema2/out').forEach(file => {
120120
t.snapshot(file)

0 commit comments

Comments
 (0)