not
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.
e.g. https://github.com/zeke/package-json-to-readme/blob/27b2129a5aeb0c04ae497fd635910220bd66b351/test/index.js#L38-L47
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.