Skip to content

Commit

Permalink
Keep replace as a test
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveTryon committed Jul 7, 2023
1 parent 3edc113 commit 33c8cda
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ import {
import { It, Mock, MockBehavior, Times } from 'typemoq';

describe('CollapsibleScriptProvider', () => {
it('produces script source that matches snapshot', async () => {
it('produces script source that matches snapshot', () => {
const source = getDefaultAddListenerForCollapsibleSection();
// Required to get a consistent snapshot with --coverage=false vs --coverage=true
// const formattedSource = (await format(source, { parser: 'babel' })).replace(/\n\n/g, '\n');
expect(source).toMatchSnapshot();
const formattedSource = source.replace(/\n\n/g, '\n');
expect(formattedSource).toMatchSnapshot();
});

it('produces script source that does not use IE-incompatible arrow functions', () => {
Expand Down

0 comments on commit 33c8cda

Please sign in to comment.