Last active
December 22, 2015 17:19
-
-
Save tonini/6505514 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# karma config file | |
module.exports = function(config) { | |
config.set({ | |
basePath: __dirname + '../../../', | |
frameworks: ['jasmine'], | |
browsers: ['PhantomJS'], | |
reporters: ['dots'], | |
autoWatch: false, | |
singleRun: true, | |
colors: true, | |
files: [ | |
'../app/assets/javascripts/list.js.coffee', | |
'../spec/javascripts/unit/*_spec.js.coffee' | |
], | |
preprocessors: { | |
'**/*.coffee': 'coffee' | |
} | |
}); | |
} | |
# list.js.coffe | |
class List | |
name: 'A list' | |
# Results in: | |
# | |
# $ karma start spec/karma/config/unit.js | |
# INFO [karma]: Karma v0.10.2 server started at http://localhost:9876/ | |
# INFO [launcher]: Starting browser PhantomJS | |
# INFO [PhantomJS 1.9.2 (Mac OS X)]: Connected on socket OLwWJSrAgtc1o-u0csd6 | |
# PhantomJS 1.9.2 (Mac OS X) ERROR | |
# SyntaxError: Parse error | |
# at /Users/<user>/code/<project>/app/assets/javascripts/list.js.coffee:1 | |
# PhantomJS 1.9.2 (Mac OS X): Executed 0 of 0 ERROR (0.026 secs / 0 secs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Maybe this?
preprocessors: {
'../*/.coffee': 'coffee'
}