4
4
5
5
import * as React from 'react' ;
6
6
import '@testing-library/jest-dom' ;
7
- import { prettyDOM , render } from '@testing-library/react' ;
7
+ import { render } from '@testing-library/react' ;
8
8
import * as LibraryEntryPoint from '../../src/entry-point' ;
9
9
import { LibraryItem } from '../../src/components/LibraryItem' ;
10
10
import { ItemData } from "../../src/LibraryUtilities" ;
@@ -28,13 +28,13 @@ describe("LibraryContainer", function () {
28
28
29
29
// When running for the first time creates a snapshot in __snapshots__ folder
30
30
// To compare with the existing snapshot for subsequent running.
31
- expect ( prettyDOM ( container ) ) . toMatchSnapshot ( ) ;
31
+ expect ( container ) . toMatchSnapshot ( ) ;
32
32
} ) ;
33
33
34
34
it ( "Test UI rendering of Library Item and child components" , function ( ) {
35
35
// Render with render() to test child components
36
36
const { container } = render ( libraryItemComponent ) ;
37
- expect ( prettyDOM ( container ) ) . toMatchSnapshot ( ) ;
37
+ expect ( container ) . toMatchSnapshot ( ) ;
38
38
} ) ;
39
39
40
40
it ( "Demonstrate testing UIitems loads correctly from static data" , function ( ) {
@@ -55,8 +55,8 @@ describe("LibraryContainer", function () {
55
55
libController . refreshLibraryView ( ) ;
56
56
57
57
// Search for all LibraryItems
58
- let text = container . querySelectorAll ( 'div.LibraryItemText' ) [ 0 ] ;
59
- expect ( prettyDOM ( text ) ) . toMatchSnapshot ( ) ;
58
+ const text = container . querySelectorAll ( 'div.LibraryItemText' ) [ 0 ] ;
59
+ expect ( text ) . toMatchSnapshot ( ) ;
60
60
} ) ;
61
61
} ) ;
62
62
0 commit comments