Trying to set up karma-ava. Getting this error. I'm using the latest version of ava, which I believe has the fix need to make karma-ava work. I've got what I've done so far here, with the relevant bits below:
[11:59:35] Starting 'test:unit'...
15 01 2017 11:59:35.550:DEBUG [config]: autoWatch set to false, because of singleRun
15 01 2017 11:59:35.551:DEBUG [plugin]: Loading karma-* from /path/to/project/node_modules
15 01 2017 11:59:35.553:DEBUG [plugin]: Loading plugin /path/to/project/node_modules/karma-ava.
15 01 2017 11:59:35.702:DEBUG [plugin]: Loading plugin /path/to/project/node_modules/karma-phantomjs-launcher.
15 01 2017 11:59:35.727:DEBUG [plugin]: Loading plugin /path/to/project/node_modules/karma-spec-reporter.
15 01 2017 11:59:35.735:DEBUG [web-server]: Instantiating middleware
{ TypeError: Cannot read property 'match' of undefined while parsing file: /path/to/project/client/reducer/__tests__/editor.spec.js
at Object.exports.fromSource (/path/to/project/node_modules/convert-source-map/index.js:122:18)
at getSourceMap (/path/to/project/node_modules/ava/lib/babel-config.js:130:35)
at Object.build (/path/to/project/node_modules/ava/lib/babel-config.js:113:18)
at Babelify._flush (/path/to/project/node_modules/karma-ava/lib/babel-transform.js:38:38)
at Babelify.<anonymous> (_stream_transform.js:118:12)
at Object.onceWrapper (events.js:290:19)
at emitNone (events.js:86:13)
at Babelify.emit (events.js:185:7)
at prefinish (_stream_writable.js:503:12)
at finishMaybe (_stream_writable.js:511:7)
at endWritable (_stream_writable.js:523:3)
at Babelify.Writable.end (_stream_writable.js:488:5)
at DuplexWrapper.<anonymous> (/path/to/project/node_modules/stream-combiner2/node_modules/duplexer2/index.js:29:14)
at Object.onceWrapper (events.js:290:19)
at emitNone (events.js:91:20)
at DuplexWrapper.emit (events.js:185:7)
filename: '/path/to/project/client/reducer/__tests__/editor.spec.js',
There isn't any way to hook into the babel configuration for karam-ava, although I don't know what configuration is required to make this work, as this error isn't familiar to me. I know there are still todos related to configuring karma-ava.
Trying to set up karma-ava. Getting this error. I'm using the latest version of
ava
, which I believe has the fix need to makekarma-ava
work. I've got what I've done so far here, with the relevant bits below:Here's my karma.conf.js.
The stack trace for the error:
There isn't any way to hook into the babel configuration for karam-ava, although I don't know what configuration is required to make this work, as this error isn't familiar to me. I know there are still
todo
s related to configuringkarma-ava
.Ideas?