groovecoder / discord

GitHub webhook that analyzes pull requests and adds comments about incompatible CSS
Mozilla Public License 2.0
29 stars 13 forks source link

Permanently record how many comments Discord has made #97

Open openjck opened 9 years ago

groovecoder commented 8 years ago

I started this here: https://github.com/mdn/discord/commit/5a0c926ec66513910e7f2bb41c30e734a1438f6e

But when I try to run tests, I get:

lcrouch:discord lcrouch$ npm test

> Discord@ test /Users/lcrouch/code/discord
> ./gulp test

[14:05:00] Using gulpfile ~/code/discord/gulpfile.js
[14:05:00] Starting 'test:jshint'...
[14:05:00] Starting 'build:migrate'...
[14:05:00] Starting 'build:readme-html'...
[14:05:01] Finished 'build:readme-html' after 1.14 s
[14:05:04] Finished 'build:migrate' after 3.37 s
[14:05:04] Starting 'build'...
[14:05:04] Finished 'build' after 25 μs
[14:05:04] Finished 'test:jshint' after 4.35 s
[14:05:04] Starting 'test:mocha'...
[14:05:05] Finished 'test:mocha' after 95 ms
[14:05:05] Starting 'test'...
[14:05:05] Finished 'test' after 5.2 μs

npm ERR! Test failed.  See above for more details.

I.e., ERR on the tests, but no details? :cry:

openjck commented 8 years ago

We talked about this on IRC, but just for the record...

I'm surprised that the tests didn't provide any more details. But as far as the cause, it may be that redis-server and postgres aren't being run. The testing documentation has more info.

Faeranne commented 8 years ago

May be time to use a more advanced test system. _coughcough_dockercough

groovecoder commented 8 years ago

Add-more-tooling-as-solution haiku ...

problem with test tools
add another tool on top
new problem on top
groovecoder commented 8 years ago

FWIW, I ran with mocha directly and got:

lcrouch:discord lcrouch$ mocha tests/tests.js

[error] Port 3000 is already in use

Do we need to run the tests via gulp? What's the value? It introduces a layer of mis-direction for stuff like this.

groovecoder commented 8 years ago

Oh, and when I shut down my gulp run process, the tests ran fine.

Maybe the test task can run on a different port than gulp run does?

openjck commented 8 years ago

Yep, exactly. The tests start the application on its default port. If the application is already running in another window there will be a conflict. +1 for having tests start the application on a different port.

One thing I like about Gulp is that it's a single point of entry for development tasks. To do x, run gulp x. We don't have to remember the name of the tool that does the task and can switch it without changing the documentation.

groovecoder commented 8 years ago

Yeah, I like it too. It's kinda like tox for python ... sometimes it gets in the way (like this), but overall saves more time than it takes.