Skip to content

Conversation

@erikkemperman
Copy link
Member

Playing around with an idea (not sure yet if I want to submit that) I found it convenient to always assert the outputs of all the streams, this helps narrow things down quickly when tests fail.

Note: If you guys agree with this principle, I guess the open PRs #75 and #113 might have to be amended accordingly. Let me know if I can help out.

@sttk
Copy link
Contributor

sttk commented May 30, 2017

@erikkemperman Thank you for pointing out. I agree and I’ll amend the added test codes in #75 and #113 according to the principle.

@erikkemperman
Copy link
Member Author

@sttk It seems that I inadvertedly managed to decrease the coverage here and there, but I haven't figured out yet how exactly. Should I worry about that, do you think?

@sttk sttk mentioned this pull request May 31, 2017
Copy link
Member

@phated phated left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I know the answer to all these questions (just following established patterns?) but I think you should update them to my suggestion unless you have another reason.

function cb(err, stdout) {
expect(err).toExist();
function cb(err, stdout, stderr) {
expect(err).toNotEqual(null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer toExist, why did you change to toNotEqual(null)?

.run(cb);

function cb(err, stdout, stderr) {
expect(err).toNotEqual(null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer toExist, why did you change to toNotEqual(null)?


function cb(err, stdout) {
function cb(err, stdout, stderr) {
expect(err).toEqual(null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer toNotExist, why did you choose to use toEqual(null)?


function cb(err, stdout) {
function cb(err, stdout, stderr) {
expect(err).toEqual(null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer toNotExist, why did you choose to use toEqual(null)?


function cb(err, stdout) {
function cb(err, stdout, stderr) {
expect(err).toEqual(null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer toNotExist, why did you choose to use toEqual(null)?

child.exec('node ' + __dirname + '/fixtures/logging.js -LLLL', cb);

function cb(err, stdout, stderr) {
expect(err).toEqual(null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer toNotExist, why did you choose to use toEqual(null)?

child.exec('node ' + __dirname + '/fixtures/logging.js', cb);

function cb(err, stdout, stderr) {
expect(err).toEqual(null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer toNotExist, why did you choose to use toEqual(null)?

child.exec('node ' + __dirname + '/fixtures/logging.js -LLL', cb);

function cb(err, stdout, stderr) {
expect(err).toEqual(null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer toNotExist, why did you choose to use toEqual(null)?

child.exec('node ' + __dirname + '/fixtures/logging.js -LL', cb);

function cb(err, stdout, stderr) {
expect(err).toEqual(null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer toNotExist, why did you choose to use toEqual(null)?

child.exec('node ' + __dirname + '/fixtures/logging.js -L', cb);

function cb(err, stdout, stderr) {
expect(err).toEqual(null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer toNotExist, why did you choose to use toEqual(null)?

@erikkemperman
Copy link
Member Author

Yeah, I just used the established pattern. You're right though, but perhaps we could address that separately? Otherwise this will have to wait until I get back from holiday in about 2 weeks.

@phated
Copy link
Member

phated commented Jun 7, 2017

@erikkemperman Yeah, I think that's fair.

@phated
Copy link
Member

phated commented Jun 7, 2017

Merged as 0abb70d (cherry-pick to drop the appveyor changes)

@phated phated closed this Jun 7, 2017
@erikkemperman erikkemperman deleted the test-callback-args branch August 4, 2017 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants