Skip to content

Commit 466bbdf

Browse files
committed
remove custom snapshotSerializers from jest config
1 parent f5c2514 commit 466bbdf

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

__tests__/Snapshottest/UIOutputComparisonTests.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import * as React from 'react';
66
import '@testing-library/jest-dom';
7-
import { prettyDOM, render } from '@testing-library/react';
7+
import { render } from '@testing-library/react';
88
import * as LibraryEntryPoint from '../../src/entry-point';
99
import { LibraryItem } from '../../src/components/LibraryItem';
1010
import { ItemData } from "../../src/LibraryUtilities";
@@ -28,13 +28,13 @@ describe("LibraryContainer", function () {
2828

2929
// When running for the first time creates a snapshot in __snapshots__ folder
3030
// To compare with the existing snapshot for subsequent running.
31-
expect(prettyDOM(container)).toMatchSnapshot();
31+
expect(container).toMatchSnapshot();
3232
});
3333

3434
it("Test UI rendering of Library Item and child components", function () {
3535
// Render with render() to test child components
3636
const { container } = render(libraryItemComponent);
37-
expect(prettyDOM(container)).toMatchSnapshot();
37+
expect(container).toMatchSnapshot();
3838
});
3939

4040
it("Demonstrate testing UIitems loads correctly from static data", function () {
@@ -55,8 +55,8 @@ describe("LibraryContainer", function () {
5555
libController.refreshLibraryView();
5656

5757
// 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();
6060
});
6161
});
6262

jest.config.ts

-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ const config: Config = {
2323
testPathIgnorePatterns: [
2424
"__tests__/data/"
2525
],
26-
snapshotSerializers: [
27-
"<rootDir>/node_modules/enzyme-to-json/serializer"
28-
],
2926
reporters: [
3027
"default",
3128
[

src/components/LibraryItem.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,6 @@ export class LibraryItem extends React.Component<LibraryItemProps, LibraryItemSt
417417
}
418418

419419
onLibraryItemClicked() {
420-
console.log("CLICKED !!");
421420
//https://jira.autodesk.com/browse/QNTM-2975
422421
//Add-ons section is always expanded.
423422
if(this.props.data.text == "Add-ons") return;

0 commit comments

Comments
 (0)