cgalvarez / atom-coverage

Add code coverage to your ES6 Atom package
MIT License
3 stars 1 forks source link

Path must be a string #15

Open twifty opened 6 years ago

twifty commented 6 years ago

When I run the test from within atom, with 'ctrl-shift-Y' or 'window:run-package-specs', I get the following exception:

path.js:7 Uncaught (in promise) TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at join (path.js:1211:7)
    at Object.testquire (/home/owen/github/php-interpreter/node_modules/atom-coverage/lib/manager.js:182:21)

The head of the test file:

import { testquire } from 'atom-coverage'
const PhpService = testquire('php-service')

I have not created any configurations (shouldn't it use the defaults?).

cgalvarez commented 6 years ago

Hi @twifty ! Firs of all, thank you very much for using this package and reporting this issue!

I have not created any configurations (shouldn't it use the defaults?).

It works for me with and without main config file (.atom-coverage) at the package root (from command line). Could you share the repo/branch (and steps) you're trying to cover so I can repro your issue for debugging?

To be honest I've tested always from command line, not inside atom. Executing from inside atom I get a different error (which I'm trying to solve right now).

EDIT: My error was due to some experimental testing I was doing with the mocha.opts config file. Nothing to do with atom-coverage.

twifty commented 6 years ago

I did also try from the command line, and it worked, if I remember correctly.

You say it works for you, just be weary that atom is a pain in the backside for caching things behind your back.

For now, I had to remove the package, as I'm up to my neck with work. I will come back to this issue though, as I really need a visual representation of the coverage within the TextEditor. Once I've finished my current workload, I'll dig into the sources and see if I can't figure out what's going wrong. Unless you fix it first of course ;-)