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.

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.

@michaelleeallen michaelleeallen added the bugfix fixes an issue label Jan 12, 2022
@michaelleeallen michaelleeallen merged commit 3b65764 into michaelleeallen:master Jan 12, 2022
@gabegorelick gabegorelick deleted the fix-build branch January 24, 2022 18:18
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