Skip to content
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

Fix test failures when running on older versions of mocha #159

Merged
merged 1 commit into from
Jan 12, 2022

Conversation

gabegorelick
Copy link
Contributor

Introduced by #157. No idea how that build passed.

@gabegorelick gabegorelick marked this pull request as draft October 14, 2021 18:26
@gabegorelick gabegorelick force-pushed the fix-build branch 2 times, most recently from 67a10e4 to a4b881a Compare October 14, 2021 18:58

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Introduced by michaelleeallen#157. No idea how that build passed.
@gabegorelick gabegorelick marked this pull request as ready for review October 14, 2021 19:02
expect(reporter._testsuites).to.have.lengthOf(2);
expect(reporter._testsuites[1].testsuite[0]._attr.name).to.equal('failing with Chai');
expect(reporter._testsuites[1].testsuite[1].testcase).to.have.lengthOf(2);
expect(reporter._testsuites[1].testsuite[1].testcase[0]._attr.name).to.equal('failing with Chai test 1');
expect(reporter._testsuites[1].testsuite[1].testcase[1].failure._attr.message).to.equal('expected {} to deeply equal { missingProperty: true }');
expect(reporter._testsuites[1].testsuite[1].testcase[1].failure._cdata).to.match(/AssertionError: expected {} to deeply equal {\s*missingProperty:\s*true\s*}\n(?:\s* at .*? \(.*?\)\n)*\n\s*\+ expected - actual\n\s*-{}\n\s*\+{\n\s*\+\s*"missingProperty":\s*true\n\s*\+}[\s\S]*/);
expect(reporter._testsuites[1].testsuite[1].testcase[1].failure._cdata).to.match(/AssertionError: expected {} to deeply equal {\s*missingProperty:\s*true\s*}\n(?:\s* at .*?\n)*\n\s*\+ expected - actual\n+\s*-{}\n\s*\+{\n\s*\+\s*"missingProperty":\s*true\n\s*\+}[\s\S]*/);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropping the requirement for enclosing parentheses in the stack frames since that's not consistent in all versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix fixes an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants