Skip to content

Commit

Permalink
Fix another test with fragile matching.
Browse files Browse the repository at this point in the history
  • Loading branch information
createthis authored and eps1lon committed Aug 2, 2022
1 parent 75a15f4 commit 658595a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .gitignore
Expand Up @@ -48,3 +48,8 @@ packages/*/LICENSE.md
packages/enzyme/README.md
packages/enzyme-adapter-react-*/README.md
packages/enzyme-adapter-utils*/README.md

# vim
**/*.swp
*.swp

7 changes: 6 additions & 1 deletion packages/enzyme-test-suite/test/shared/lifecycles/misc.jsx
Expand Up @@ -491,7 +491,12 @@ export default function describeMisc({
const [name, error, info] = fourth;
expect(name).to.equal('componentDidCatch');
expect(error).to.satisfy(properErrorMessage);
expect(info).to.deep.equal(expectedInfo);
if (is('>= 17')) {
expect(info).to.have.property('componentStack');
expect(info.componentStack).to.match(/at Thrower (.+)\n/);
} else {
expect(info).to.deep.equal(expectedInfo);
}

expect(stateSpy.args).to.deep.equal([
[{
Expand Down

0 comments on commit 658595a

Please sign in to comment.