Comments (14)
found the issue
im creating object tree that represent the suits
the problem is that im creating object with test property (not the best idea need to change it to uniuqe name)
so for your problem you have test in fronend/index.spec.js
describe("test", function () {
});
as a workaround change the test to something else
from mocha-sidebar.
Thanks, that did the trick! I changed the name of my test from "test" to something else and it is working now.
from mocha-sidebar.
fixed for version 0.10.16 (checked also in your code :))
the problem was that for some reason the code was not published to the marketplace
from mocha-sidebar.
I updated Mocha Sidebar again, and it is working fine now. Thanks!
from mocha-sidebar.
Do you have something in this path
'/home/user/dir1/dir2/dir3/undefined
It's seems like that you referencing to wrong path
Is it run successfully when you running mocha from command line
from mocha-sidebar.
No I do not have anything in the path '/home/user/dir1/dir2/dir3/undefined'.
The path '/home/user/dir1/dir2/dir3' exists, but the path '/home/user/dir1/dir2/dir3/undefined' does not exist.'
It runs successfully when I run mocha from command line.
Also, I can run test suits individually from mocha-sidebar.
I use these configurations
"mocha.options": {"bail": false, "fullTrace": true, "useColors": true, "useInlineDiffs": true }, "mocha.files.glob": "dist/**/*.spec.js"from mocha-sidebar.
from mocha-sidebar.
couldn't reproduce it on my pc with my tests , if you can upload not working sample it will be helpful tks
from mocha-sidebar.
You can clone/fork the project, and open it in vscode:
https://github.com/rosesonfire/react-try-out
And use this .vscode/settings.json
{ "editor.tabSize": 2, "mocha.options": {"bail": false, "fullTrace": true, "useColors": true, "useInlineDiffs": true }, "mocha.files.glob": "dist/**/*.spec.js" }
- Then run:
npm install
- Then run the tests from command line. This runs successfully:
npm run test
- Then refresh the mocha-sidebar and the tests should be visible in the mocha-sidebar. Right click on the root (i.e. Tests) and click Run all tests. This triggers the exception in the output.
- However, if you right click on individual tests or test-suites, and click Run test or Run tests from this level, the corresponding test(s) run successfully.
Let me know if I am doing something wrong here.
from mocha-sidebar.
from mocha-sidebar.
please verify that its working for you without the workaround tks :)
from mocha-sidebar.
I updated the extension by uninstalling and then reinstalling it in vscode and tried again. I am afraid the exception was thrown again.
Test file(s): undefined module.js:529 throw err; ^ Error: Cannot find module '/home/user/dir1/dir2/dir3/undefined' at Function.Module._resolveFilename (module.js:527:15) at Function.Module._load (module.js:476:23) at Module.require (module.js:568:17) at require (internal/module.js:11:18) at /home/user/.vscode/extensions/maty.vscode-mocha-sidebar-0.10.14/node_modules/mocha/lib/mocha.js:220:27 at Array.forEach () at Mocha.loadFiles (/home/user/.vscode/extensions/maty.vscode-mocha-sidebar-0.10.14/node_modules/mocha/lib/mocha.js:217:14) at Mocha.run (/home/user/.vscode/extensions/maty.vscode-mocha-sidebar-0.10.14/node_modules/mocha/lib/mocha.js:469:10) at Object. (/home/user/.vscode/extensions/maty.vscode-mocha-sidebar-0.10.14/worker/runtest.js:57:7) at Module._compile (module.js:624:30) at Object.Module._extensions..js (module.js:635:10) at Module.load (module.js:545:32) at tryModuleLoad (module.js:508:12) at Function.Module._load (module.js:500:3) at Function.Module.runMain (module.js:665:10) at startup (bootstrap_node.js:201:16)
from mocha-sidebar.
from mocha-sidebar.
I'm closing the issue tks
from mocha-sidebar.
Related Issues (20)
- Command 'mocha-maty.refreshExplorer' not found (again) HOT 4
- v0.22.2 isn't tagged (?)
- ge report html nyc mocha
- Failed test error message persisting through successful test run
- Extension issue
- It doesn't run my setup/global file as mocha does HOT 3
- Test failure results not displayed anywhere
- Unit tests (usually) do not attach to debugger unless the focus is on the file that is being tested - Inconsistent
- Feature request: configure different run command for tests in a given directory by placing a config file in the directory
- Crashes
- Debug/run a single TypeScript test from Sidebar fails HOT 1
- cannot run es6 modules based tests HOT 3
- Mocha sidebar extension issue in VSCode HOT 1
- Does this repo have any maintenance at all?
- cant find nyc locally HOT 2
- Click for coverage fails with 'ReferenceError: suite is not defined'
- cannot find module when importing json file in nodejs application
- Is this project abandoned? Alternatives? HOT 2
- support for c8 coverage tool
- [Typescript] "Run test at cursor" command fails with "Mocha is only available for JavaScript files."
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mocha-sidebar.