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

Add test to make sure we don't miss any console.logs in tests #88

Closed
kokarn opened this issue Oct 22, 2015 · 6 comments
Closed

Add test to make sure we don't miss any console.logs in tests #88

kokarn opened this issue Oct 22, 2015 · 6 comments

Comments

@kokarn
Copy link
Member

kokarn commented Oct 22, 2015

No description provided.

@jwilsson
Copy link
Member

I'm not sure I follow, the console.logs in 0756cba were just stray ones which I forgot to remove.

Are you thinking of some sort of JSHint/JSCS check for console.logs in tests?

@kokarn
Copy link
Member Author

kokarn commented Oct 22, 2015

Yeah, that should work.
As long as it stops them from showing up in the commited code where they shouldn't be :)

@CITguy
Copy link
Contributor

CITguy commented Oct 26, 2015

For a project I work on, we use a script to be run on the git pre-commit hook, so that it won't allow you to commit if there are debugging statements still present in the code. The hook installs itself via an NPM postinstall. Here's a gist that might be useful: https://gist.github.com/CITguy/1138a1701b9ffbf4e091

@jwilsson
Copy link
Member

@CITguy looks pretty nice, thanks for sharing!

I'll see if I can work something out.

@jwilsson
Copy link
Member

We talked about using Gulp and running all our tests and linting through it, and I figured we can check for stray console.log()s there as well (that way it'll be automatically run together with npm test).

We just need to make sure it doesn't abort the tests while developing something. I'll work something out tonight.

@shellscape
Copy link
Contributor

👍

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

No branches or pull requests

4 participants