Comments (6)
Hi did you tried exactly what was written in the q&a section in the readme file
There is specific section about using Typescript
Try it and if it not works for you tell me tks
from mocha-sidebar.
I have run into the same problem as well. I do not use typescript, I use just javascript. The problem I faced was: whatever was mentioned in the mocha.requires part was loaded from the node_modules and not the project root.
Please note: when mocha is run with command line with the --require switch, it works.
from mocha-sidebar.
@maty21 the typescript bit has nothing to do with this problem ... its the path resolution for require that seems to be fishy :/
from mocha-sidebar.
fix published in version 0.13.0 of the extension. @tomitrescak could you verify that it works now?
from mocha-sidebar.
Hi, thanks for the fix. Not sure what is wrong, but I still can't make this work:
The are my options:
{
"mocha.env": {
"TS_NODE_FAST": "true"
},
"mocha.options": {
"grep": "@server",
"invert": "",
"exit": "",
"ui": "snapshots"
},
"mocha.files.glob": "src/**/*.test.ts*",
"mocha.files.ignore": [
"**/.git/**/*",
"**/node_modules/**/*"
],
"mocha.runTestsOnSave": "true",
"mocha.requires": ["./mocha.js"]
}
This is the output:
Running Mocha with Node.js at "/usr/local/bin/node"
Applying Mocha options:
{
"grep": "@server",
"invert": "",
"exit": "",
"ui": "snapshots"
}
It never finishes.
And if you wonder what is in that required mocha.js file it's this:
// setup ts compilation
require('ts-node/register');
// setup mocha
require('chai-match-snapshot/mocha').setupMocha();
// setup snapshot testing with mocha
require('wafl').setup({
snapshotMode: process.env.US ? 'drive' : 'test'
});
from mocha-sidebar.
I'll take a look
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.