Skip to content

Commit 5d6c088

Browse files
committed
remove useless command args after before refor
1 parent d47d22c commit 5d6c088

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

lib/commandExecutorBuilder.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ function buildCommandExecutor(failedByAssert, runOpts) {
1414

1515

1616
const executeCommandAsync = (cmd, index) => new Promise((resolve) => {
17-
console.log(addSpecificOptionsBeforeRun)
1817
let watcher = null
1918
let additionalOpts = null
2019
let originalCmd = cmd
@@ -97,8 +96,9 @@ function buildCommandExecutor(failedByAssert, runOpts) {
9796
if(addCommandOptionsAfterRun && commandToRerun) {
9897
commandToRerun = addCommandOptionsAfterRun(commandToRerun, executionStack)
9998
}
100-
if(additionalOpts) {
10199

100+
if(additionalOpts) {
101+
commandToRerun = commandToRerun.replace(additionalOpts, '')
102102
}
103103

104104
resolve(commandToRerun)

unit_specs/index.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe('kernel', () => {
4646
expect(failedCmds.every((failedCmd) => failedCmd.includes(`CURRENT_EXECUTION_COUNT=${specRerunCount - 1}`))).to.eq(true)
4747
}
4848
})
49-
it.only('formCommanWithOption', async () => {
49+
it('formCommanWithOption', async () => {
5050
let holder = null
5151
const cmd = `node -e "console.log('test'); process.exit(1)"`
5252
const stackAnalize = () => true
@@ -65,5 +65,6 @@ describe('kernel', () => {
6565
})
6666
const failedCmds = await reRunner(cmds)
6767
expect(failedCmds).to.eql([`${cmd}`])
68+
expect(holder).to.eq(true)
6869
})
6970
})

0 commit comments

Comments
 (0)