Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve test coverage by adding more tests #967

Merged
merged 8 commits into from
Aug 11, 2016

Conversation

dananichev
Copy link
Contributor

#161 tests update.

Also, removed unreachable (?) code from lib/reporters/mini.js

@sindresorhus
Copy link
Member

Just wanted to say that we appreciate the pull request :) This will have to wait for a little bit as we would like to get #880 landed first.

@ghost
Copy link

ghost commented Aug 5, 2016

@sindresorhus Any timeframe regarding when #880 are going to be merged? Seems stall atm. 3 months since the PR was created.

@sindresorhus
Copy link
Member

@dananichev #880 is not happening now after all, so we can go forward with this :)

t.end();
});

test('should return full stack', function (t) {
Copy link
Member

Choose a reason for hiding this comment

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

Why should it return full stack?

@sindresorhus sindresorhus changed the title #161 a little bit of new tests improve test coverage by adding more tests Aug 6, 2016
@sindresorhus
Copy link
Member

Nice work @dananichev :)

@dananichev
Copy link
Contributor Author

@sindresorhus sorry for my Perfect English skills (c) :)

'at Stub.listOnTimeout (timers.js:119:15)\n'
);

t.true(result.search('ava/cli.js') !== -1);
Copy link
Member

Choose a reason for hiding this comment

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

This should use indexOf instead. You're actually not using a regex in the search() method.

'at Stub.listOnTimeout (timers.js:119:15)\n'
);

t.true(result.indexOf('ava/cli.js') >= 0);
Copy link
Member

Choose a reason for hiding this comment

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

>= 0 => !== -1

@sindresorhus
Copy link
Member

Added some more nitpick feedback inline. Otherwise looks good :)

@sindresorhus
Copy link
Member

The Windows build is failing: https://ci.appveyor.com/project/ava/ava/build/170

@dananichev
Copy link
Contributor Author

dananichev commented Aug 10, 2016

@sindresorhus it seems the problem is somewhat related to sindresorhus/execa#35. At least simptoms are similar (maybe it's just my imagination though):

[Error: spawn undefined ENOENT]
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn undefined',
...

I'm trying to locate the problem behind this. But my VMs are pretty much slow (dunno why though). I will continue to investigate this further from home (with native Windows).

@dananichev
Copy link
Contributor Author

dananichev commented Aug 11, 2016

@sindresorhus i hope you are fine with usage of err.stderr in test/profile.js?

@@ -23,7 +23,7 @@ test('runs the profiler and throws an error when invoked without files to run',
t.plan(1);
run()
.catch(function (err) {
t.ok(/Specify a test file/.test(err.message));
t.ok(/Specify a test file/g.test(err.stderr));
Copy link
Member

Choose a reason for hiding this comment

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

There's no point in having the g flag here.

Copy link
Member

Choose a reason for hiding this comment

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

Fixed it for you when merging.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

One of this CMD+Z's was too much i think.

@sindresorhus sindresorhus merged commit b71850a into avajs:master Aug 11, 2016
@sindresorhus
Copy link
Member

🎉 Looks great now. Thank you @dananichev :)

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.

2 participants