Open timoxley opened 9 years ago
Agreed. Are you interested in submitting a PR?
What would api look like do you think?
Having a a .not() in the chain makes it a little unclear whether it should be before or after the expectation:
nixt()
.cwd(path.join(__dirname, 'node_modules', '.bin'))
.run('mocha --version')
.stdout('1.13.0')
.not()
.end();
nixt()
.cwd(path.join(__dirname, 'node_modules', '.bin'))
.run('mocha --version')
.not()
.stdout('1.13.0')
.end();
Maybe create a not* version of each expectation, e.g.
nixt()
.cwd(path.join(__dirname, 'node_modules', '.bin'))
.run('mocha --version')
.notStdout('1.13.0')
.end();
Sorry for the late response. I agree with you, the not* version
of each expectation feels much better.
Would be good if there were a nice way to indicate that you want some set of expectations to not match, e.g. test that adding a flag adds some value, test that without the flag, the value is no longer there.