You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.
I want to write ut test for tpyescript . Below command in the shell is ok.
mocha -r /home/wjh/node_modules/ts-node/register /home/wjh/ut/src/*.ts --reporter min
and then i want to use mocha under karma like this in karma.conf.js,but it is not ok. Can anyone help me?
karam.conf.js:
......
client: {
mocha: {
// change Karma's debug.html to the mocha web reporter
reporter: 'min',
// require specific files after Mocha is initialized
require: '/home/wjh/node_modules/ts-node/register',
// custom ui, defined in required file above
ui:'bdd'
}
},
require:[require.resolve( '/home/wjh/node_modules/ts-node/register'), is not work either
The text was updated successfully, but these errors were encountered:
I think I'm having the same issue.
I have a runner.js that requires the javascript spec files like this:
require(arrayOfFiles, function() {
mocha.run();
Everything is working correctly with mocha v3.5.0, but updating to mocha v4.0.1, the files are not required anymore: it never gets in the require callback. No error in the console, just silent.
@wangjihong0214 did you try just require:[require.resolve('ts-node/register')]? @maksimr, this should get tests written in typescript to run without compilation. I've gotten this to work with a pure mocha/chai implementation but the register doesn't seem to kick in when karma is involved. Any thoughts on a solution?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I want to write ut test for tpyescript . Below command in the shell is ok.
mocha -r /home/wjh/node_modules/ts-node/register /home/wjh/ut/src/*.ts --reporter min
and then i want to use mocha under karma like this in karma.conf.js,but it is not ok. Can anyone help me?
karam.conf.js:
......
client: {
mocha: {
// change Karma's debug.html to the mocha web reporter
reporter: 'min',
// require specific files after Mocha is initialized
require: '/home/wjh/node_modules/ts-node/register',
// custom ui, defined in required file above
ui:'bdd'
}
},
require:[require.resolve( '/home/wjh/node_modules/ts-node/register'), is not work either
The text was updated successfully, but these errors were encountered: