"config.files.map is not a function" when passing --files option
See original GitHub issueHi, It seems I am unable to instruct Karma to only run a particular file.
Is this not possible anymore (I saw a reference to this having been possible on Stack Overflow)?
$ karma run karma.conf.js --files=new Array\("tests/unit/frontend/specs/timeLeftSpec.js"\)
[2015-11-30 10:20:50.784] [DEBUG] config - Loading config /Users/vs/Kod/myproject/karma.conf.js
/Users/vs/Kod/myproject/node_modules/karma/lib/config.js:107
config.files = config.files.map(createPatternObject).map(createPatternMapper(basePathResolve));
^
TypeError: config.files.map is not a function
at normalizeConfig (/Users/vs/Kod/myproject/node_modules/karma/lib/config.js:107:31)
at Object.parseConfig (/Users/vs/Kod/myproject/node_modules/karma/lib/config.js:293:10)
at Object.exports.run (/Users/vs/Kod/myproject/node_modules/karma/lib/runner.js:30:16)
at Object.<anonymous> (/usr/local/share/npm/lib/node_modules/karma/bin/karma:22:39)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:475:10)
at startup (node.js:117:18)
I imagine using this for allowing my IDE (PhpStorm) to run the Karma test for a file (in the IDE) whenever a test/implementation file changes.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:19 (6 by maintainers)
Top Results From Across the Web
data.map is not a function - Stack Overflow
The answer is to use data.products.map , not to wrap data in an array. Your answer causes the entire data object to be...
Read more >TypeError: map() is not a function in React | bobbyhadz
The "TypeError: map is not a function" occurs when we call the map() method on a value that is not an array. To...
Read more >TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value...
Read more >How to Handle JavaScript Uncaught TypeError: “x” is Not a ...
The Javascript TypeError: "x" is not a function occurs when calling a function on a value or object, which is not actually a...
Read more >Python developer reference for Azure Functions
json: Contains configuration options that affect all functions in a function app instance. This file does get published to Azure. Not all ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Banging my head on the wall for a few hours of this now, I don’t get why karma needs to be this user-hostile to running a single test. Makes TDD
a true painedit: excruciating.Comments like this are pretty maintainer-hostile. So if you need this so badly why not create a good PR with tests to solve the issue?