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

npm test not working out of the box #625

Closed

Description

@kkrueger

Version 0.8.0
npm version 4.0.5

yo aspnetcore-spa
Framework: Angular 2
Do you want to include unit tests? yes

Immediately thereafter:

C:\test>npm test

> Angular2Spa@0.0.0 test C:\test
> karma start ClientApp/test/karma.conf.js

30 01 2017 15:22:47.534:ERROR [config]: Error in config file!
 TypeError: require(...).filter is not a function
    at module.exports (C:\test\ClientApp\test\karma.conf.js:23:53)
    at Object.parseConfig (C:\test\node_modules\karma\lib\config.js:396:5)
    at new Server (C:\test\node_modules\karma\lib\server.js:56:20)
    at Object.exports.run (C:\test\node_modules\karma\lib\cli.js:280:7)
    at requireCliAndRun (C:\test\node_modules\karma-cli\bin\karma:44:16)
    at C:\test\node_modules\karma-cli\bin\karma:54:12
    at C:\test\node_modules\resolve\lib\async.js:45:21
    at ondir (C:\test\node_modules\resolve\lib\async.js:188:31)
    at C:\test\node_modules\resolve\lib\async.js:154:39
    at onex (C:\test\node_modules\resolve\lib\async.js:94:22)
    at C:\test\node_modules\resolve\lib\async.js:25:18
    at FSReqWrap.oncomplete (fs.js:112:15)
npm ERR! Test failed.  See above for more details.

Activity

  1. SteveSandersonMS commented on Jan 31, 2017

    @SteveSandersonMS
    Member

    Thanks for reporting this. It was to do with the upgrade to Webpack 2. The fix is pretty tiny - see this diff to see how to modify your karma.conf.js file: 847430a

    This fix is now in the templates and will be published to NPM soon.

  2. kkrueger commented on Jan 31, 2017

    @kkrueger
    Author

    Thanks. I figured it was an easy fix. This stack is entirely new to me, so I wasn't sure where to look. Thank you for all that you do from a long time knockout user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions