forked from ckknight/gorillascript
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
This seems to be an subtle issue related to the gorillascript compiler and Jest:
Using node 0.12.x
Modifying the documentation here to support gorillascript: https://facebook.github.io/jest/docs/tutorial-coffeescript.html#content
Assume a jest-cli-prepocessor file like this:
var gorilla = require('gorillascript');
exports.process = function (src, path) {
if (/\.(gs|gorilla)$/.test(path)) {
// This works if the file extension is '.gorilla' but not if the extension is '.gs'
// I would think this is a Jest issue except that if I rename random coffeescript files to .gs extensions
// then do:
// return coffee.compile(src, { "bare": true });
// instead, then everything works as one would expect
return gorilla.compile(src, {
"bare": true
}).code;
}
return src;
};
The behavior is really inexplicable to me, since seemingly there is no relationship to the file path in the above code, but nonetheless.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels