Last active
August 29, 2015 14:02
-
-
Save jeffmo/f9db99b6c197327a30a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# __tests__/foo-test.coffee | |
describe 'hai', -> | |
it 'asdf', -> | |
foo = require '../foo' | |
console.log foo | |
it 'asdf2', -> | |
foo = require '../foo' | |
console.log foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# foo.coffee | |
module.exports = 42; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "test", | |
"dependencies": { | |
"coffee-script": "*", | |
"jest-cli": "*" | |
}, | |
"jest": { | |
"scriptPreprocessor": "<rootDir>/preprocessor.js", | |
"testFileExtensions": ["coffee", "js"], | |
"moduleFileExtensions": ["js", "json", "coffee"] | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var coffee = require('coffee-script'); | |
module.exports = { | |
process: function(src, path) { | |
// CoffeeScript files can be .coffee, .litcoffee, or .coffee.md | |
if (coffee.helpers.isCoffee(path)) { | |
return coffee.compile(src, {'bare': true}); | |
} | |
return src; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment