Hi,
I have created a mocha project and included the spec file '.mocharc.json' and included the reporter '"@mochajs/json-file-reporter'.
My .mocharc.json looks like below
{
"spec": "test/**/test1.js",
"reporter": "@mochajs/json-file-reporter",
"reporter-option": [
"output=filename.json"
]
}
Scripts on the package.json as below
"scripts": {
"test": "mocha"
},
When i given npm test, it worked fine.
Then again, i ve created a new project and i didn't install/use any reference of '@mochajs/json-file-reporter' (not even have any .mocharc.json file) and specified the test directly on the scripts.
When i run this test from the new project, i am getting the Error MODULE NOT FOUND for @mochajs json-file-reporter
When i install this package, i am getting the error like 'Couldn't find any files matching pattern "test/**/test1.js"'.
I am not sure why my tests are not getting picked up from the current project and why this is always referring to the first one.
Has anyone come across this issue on Mocha?
Hi,
I have created a mocha project and included the spec file '.mocharc.json' and included the reporter '"@mochajs/json-file-reporter'.
My .mocharc.json looks like below
{
"spec": "test/**/test1.js",
"reporter": "@mochajs/json-file-reporter",
"reporter-option": [
"output=filename.json"
]
}
Scripts on the package.json as below
"scripts": {
"test": "mocha"
},
When i given npm test, it worked fine.
Then again, i ve created a new project and i didn't install/use any reference of '@mochajs/json-file-reporter' (not even have any .mocharc.json file) and specified the test directly on the scripts.
When i run this test from the new project, i am getting the Error MODULE NOT FOUND for @mochajs json-file-reporter
When i install this package, i am getting the error like 'Couldn't find any files matching pattern "test/**/test1.js"'.
I am not sure why my tests are not getting picked up from the current project and why this is always referring to the first one.
Has anyone come across this issue on Mocha?