From 836a6abeac7d263e1e8924876316a3998a7acf7a Mon Sep 17 00:00:00 2001 From: dreamwasp Date: Tue, 15 Oct 2024 17:10:45 -0400 Subject: [PATCH] just for tables --- packages/gamut/src/Markdown/__tests__/Markdown.test.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/gamut/src/Markdown/__tests__/Markdown.test.tsx b/packages/gamut/src/Markdown/__tests__/Markdown.test.tsx index 191c2b54e0..dea413b9d8 100644 --- a/packages/gamut/src/Markdown/__tests__/Markdown.test.tsx +++ b/packages/gamut/src/Markdown/__tests__/Markdown.test.tsx @@ -75,10 +75,6 @@ const table = ` const renderView = setupRtl(Markdown); describe('', () => { - beforeEach(() => { - // We are mimicking unconventional behavior in the markdown parser, so these errors are expected. - jest.spyOn(console, 'error').mockImplementation(jest.fn()); - }); it('renders standard Markdown', () => { renderView({ text: basicMarkdown }); screen.getByRole('heading', { level: 1 }); @@ -94,6 +90,7 @@ describe('', () => { }); it('Renders custom tables in markdown', () => { + jest.spyOn(console, 'error').mockImplementation(jest.fn()); renderView({ text: table }); expect(document.querySelectorAll('div.tableWrapper table').length).toEqual( 1 @@ -101,6 +98,7 @@ describe('', () => { }); it('Skips rendering custom tables in markdown when skipProcessing.table is true', () => { + jest.spyOn(console, 'error').mockImplementation(jest.fn()); renderView({ skipDefaultOverrides: { table: true }, text: table,