Skip to content

Commit

Permalink
Merge pull request #6143 from ampproject/dependabot/npm_and_yarn/esli…
Browse files Browse the repository at this point in the history
…nt-plugin-jest-24.3.6
  • Loading branch information
dependabot-preview[bot] authored Apr 30, 2021
2 parents cc19268 + 4dabab8 commit b28697b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
6 changes: 6 additions & 0 deletions assets/src/block-validation/components/error/test/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,10 @@ describe( 'ErrorTypeIcon', () => {
}

if ( ! expectedClass ) {
// eslint-disable-next-line jest/no-conditional-expect
expect( container.querySelector( 'svg[class^=amp-error__error-type-icon]' ) ).toBeNull();
} else {
// eslint-disable-next-line jest/no-conditional-expect
expect( container.querySelector( expectedClass ) ).not.toBeNull();
}
} );
Expand Down Expand Up @@ -394,18 +396,21 @@ describe( 'ErrorContent', () => {
act( () => {
dispatch( 'core/block-editor' ).removeBlock( clientId, false );
} );
// eslint-disable-next-line jest/no-conditional-expect
expect( container.innerHTML ).toContain( 'error is no longer detected' );
return;
}

if ( null === clientId ) {
// eslint-disable-next-line jest/no-conditional-expect
expect( container.innerHTML ).toContain( 'outside the content' );
return;
}

expect( container.innerHTML ).toContain( '<dt>Source' );
expect( container.innerHTML ).not.toContain( 'outside the content' );

/* eslint-disable jest/no-conditional-expect */
switch ( testBlockSource ) {
case 'plugin':
expect( container.innerHTML ).toContain( 'test plugin block' );
Expand All @@ -429,6 +434,7 @@ describe( 'ErrorContent', () => {

default:
break;
/* eslint-enable jest/no-conditional-expect */
}

expect( container.innerHTML ).toContain(
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"eslint": "7.25.0",
"eslint-plugin-eslint-comments": "3.2.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jest": "24.3.5",
"eslint-plugin-jest": "24.3.6",
"eslint-plugin-jsdoc": "32.3.3",
"eslint-plugin-react": "7.23.2",
"eslint-plugin-react-hooks": "4.2.0",
Expand Down

0 comments on commit b28697b

Please sign in to comment.