appacademy / practice-for-week-04-class-practice

0 stars 34 forks source link

Throw an error #1

Open Dmytro2V opened 2 years ago

Dmytro2V commented 2 years ago

Does anybody passed the part of the test with "throwing error"?

Dmytro2V commented 2 years ago

In test there is a wrong syntax: to.throw.Error('str'), and it always gives up an error in mocha: Error: Invalid Chai property: throw.Error. See docs for proper usage of "throw". Proper syntax from official Chai docs is: to.throw(Error, 'str') or to.throw('str') . In the first case person.js had to throw like throw new Error('str') , in second one - throw('str').

TheSaviourEking commented 1 year ago

Does anybody passed the part of the test with "throwing error"?

been having the same ish for hours, researched and tried all i can think of, i reall believe there coulb be an error in the test files because all my local test have passed except the one that comes with the project!.

Did you get your's to pass?

Dmytro2V commented 1 year ago

Does anybody passed the part of the test with "throwing error"?

been having the same ish for hours, researched and tried all i can think of, i reall believe there coulb be an error in the test files because all my local test have passed except the one that comes with the project!.

Did you get your's to pass?

Looks like as an issue described is corrected and ok now, so everything has to work. If you still need help, open an issue on AAO discord help channel.

TheSaviourEking commented 1 year ago

Thanks much @Dmytro2V