Open fasatrix opened 5 years ago
Thanks for posting this issue @fasatrix. Still, it's not enough information to reproduce this issue.
--full-trace
?mocha
?HI , thanks for the quick response.
1) I am not sure what answer to this question, parallel test will run the entire suite which is comprised of several files and folders. What I have noticed is that if I reduce the number of threads to 1 then the tests start being executed and only when the runner gets to the one that instantiate the class breaks. 2) the output of this command (mocha-parallel-tests --opts ./mocha.opts --max-parallel 5 --slow 50 --full-trace) does produce the same results as if --full-trace was not included, I added more info from the error below 3) No it does not this is the reason of why I believe there might be a bug with the package 4) Sorry I am unable to share/publish the repo unfortunately as it is sensitive
TypeError: api_services_1.ApiService is not a constructor
at Object.
This will be hard to reproduce since we have only these two things as an input:
mocha.opts file
--reporter mocha-jenkins-reporter
--timeout 300000
--require ts-node/register
--require tsconfig-paths/register
tests/**/*.ts
And some test TS file with this:
type JWTType = 'defaultValue';
class ApiService {
_environmentUrl: string;
jwtType: JWTType;
constructor( jwtType: JWTType = 'defaultValue' ) {
this._environmentUrl = `${environmentUrl}`;
this.jwtType = jwtType ;
}
}
describe('suite', () => {
it('case', () => {
const obj = new ApiService();
});
});
If it works, I will not have any other ideas other than close this issue.
No worries lets close it
Nah, let's keep it open so that someone can take a look at it.
Hi, I am experiencing the following error running one of my test suites.
Command: mocha-parallel-tests --opts ./mocha.opts --max-parallel 5 --slow 50
mocha.opts content as follows --reporter mocha-jenkins-reporter --timeout 300000 --require ts-node/register --require tsconfig-paths/register tests/*/.ts
error: testfile.ts:15 const httpService: ApiService = new ApiService();
class instance : const httpService: ApiService = new ApiService();
class constructor:
Any help would be much appreciated Thanks