Skip to content

Commit

Permalink
Merge c9cf218 into 834be39
Browse files Browse the repository at this point in the history
  • Loading branch information
FRSgit committed Oct 18, 2019
2 parents 834be39 + c9cf218 commit 1b91d42
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 665 deletions.
2 changes: 1 addition & 1 deletion bin/cli.spec.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ tap.test('input argument', async (t) => {
ct,
[regex, replacement, '--stdout'],
['-i', '--input'],
`${dir}\\${tmpPrefixes.input}*`,
`${dir}/${tmpPrefixes.input}*`,
(cct, result) => {
cct.is(result.status, 0, 'process should send success status (0)')
cct.is(result.parsedOutput, expectedOutput + defaults.inputJoinString + expectedOutput, 'stdout should contain replaced string')
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"tmp-promise": "^2.0.2"
},
"dependencies": {
"fast-glob": "^2.2.3",
"fast-glob": "^3.1.0",
"get-stdin": "^7.0.0",
"yargs": "^14.2.0",
"write": "^2.0.0"
Expand Down
6 changes: 3 additions & 3 deletions src/replace.spec.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ tap.test('check api', async t => {
await checkSyncAsync(cct, 'is', [testInput, expectedOutput + defaults.inputJoinString + expectedOutput, 'replaced correctly'])

await cct.test('with inputJoinString changed', async ccct => {
testInput.input = `${dir}\\${tmpPrefixes.input}*`
testInput.input = [input.path, input2.path]
testInput.inputJoinString = 'someCustomString\n\t'

await checkSyncAsync(ccct, 'is', [testInput, expectedOutput + testInput.inputJoinString + expectedOutput, 'replaced correctly'])
Expand All @@ -137,12 +137,12 @@ tap.test('check api', async t => {
})

await ct.test('as glob pattern', async cct => {
testInput.input = `${dir}\\${tmpPrefixes.input}*`
testInput.input = `${dir}/${tmpPrefixes.input}*`

await checkSyncAsync(cct, 'is', [testInput, expectedOutput + defaults.inputJoinString + expectedOutput, 'replaced correctly'])

await cct.test('with inputGlobOptions', async ccct => {
testInput.input = `${dir}\\${tmpPrefixes.input}*`
testInput.input = `${dir}/${tmpPrefixes.input}*`
testInput.inputGlobOptions = { onlyDirectories: true }

await checkSyncAsync(ccct, 'is', [testInput, '', 'replaced correctly'])
Expand Down
Loading

0 comments on commit 1b91d42

Please sign in to comment.