Skip to content
This repository has been archived by the owner on Aug 8, 2020. It is now read-only.

Bug instantiating middleware #7

Open
mAAdhaTTah opened this issue Jan 15, 2017 · 0 comments
Open

Bug instantiating middleware #7

mAAdhaTTah opened this issue Jan 15, 2017 · 0 comments

Comments

@mAAdhaTTah
Copy link

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:

"ava": "^0.17.0",
"karma-ava": "git+ssh://git@github.com/avajs/karma-ava.git",

Here's my karma.conf.js.

The stack trace for the error:

[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.

Ideas?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant