jamesshore / quixote

CSS unit and integration testing
Other
848 stars 45 forks source link

Diff when running tests on master #46

Closed JuanCaicedo closed 7 years ago

JuanCaicedo commented 7 years ago

On a clean version of master, if I start the server with $ ./jake.sh karma and then run $ ./jake.sh loose=true in another tab, I get a diff in the following files

    modified:   dist/quixote.js
    modified:   example/vendor/quixote.js

The diff in each seems to be something along the lines of this being deleted

//# sourceMappingURL=data:application/json;charset=utf-8;

(The diff is much bigger, but I thought it might not be worth adding all of it)

Is this intended? Do the tests perhaps build the library to test?

jamesshore commented 7 years ago

That's intended. It's the bundled version of Quixote, which is built by the full build (jake.sh).

Normally you wouldn't see a diff after building a clean version of master, but in your case it's probably a result of you using a different version of one of our npm modules.

To avoid creating it, use the quick build (jake.sh quick).

JuanCaicedo commented 7 years ago

jake.sh quick seems to run the linter but no tests, is that right?

As for the different versions, what would you think of using yarn for installing dependencies? It's an extra step, but we're using it for a few things at work and have had a good experience. It locks down dependency version so that the build is always reproducible

jamesshore commented 7 years ago

jake.sh quick runs tests, but not if the files haven't changed. It also only lints files that have changed. (To force it to re-run everything, run jake.sh clean then jake.sh quick. Or just run ./jake.sh.)

jamesshore commented 7 years ago

Regarding yarn, I usually lock down dependency versions by checking in node_modules. I didn't in this case because Quixote's a published module. I'm not opposed to using yarn, but so far it hasn't been enough of an issue to warrant changing workflow.

JuanCaicedo commented 7 years ago

We also check in node_modules at work, but we've found it to be a pain point as time goes on.

I'll move the yarn discussion into another issue (#48), then if there are enough drivers for it, we can move to it then