-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: test.fullTitle is not a function #79
Comments
Sample test code? |
hi adam, thanks for the quick response.
In lib/mochawesome.js Line 256 you call the method test.fullTitle() which does't exist if an empty string is passed. A simple fix could be to set the fullTitle to '(no description)' or throw an more verbose error: if (test.fullTitle === undefined) {
throw new Error(chalk.bold.red(`Empty Mocha Description in Testfile: ${test.file}`));
} |
@ellerbrock I've seen this issue pop up before. I can add some checks in my code but I think the bigger problem is on mocha's end. They assume nobody would leave the description empty. I think this open PR might fix it (mochajs/mocha#2371). In the meantime, easiest fix is to not have empty describes. ;) |
@adamgruber jupp i saw that too yesterday that mocha did not test if its a empty string. anyway, thanks for your good work. issue.close(); cheers maiky |
I'm having the exact same issue but it has nothing to do with the describe. It happens when mocha.run() is called more than once. Here's my code:
And my test code:
When the add or watch event is called more than once, it fails. |
I have the same issue as @CodingMadeEasy suggested |
hi there,
mochasome looks really cool.
i just tried to run it for the first time but straight run in an error :(
Environment Information
npm: 3.10.7
node: v6.5.0
mocha: 3.0.2
mochasome: 1.5.2
The text was updated successfully, but these errors were encountered: