Skip to content

Commit c40e7ae

Browse files
author
Kent C. Dodds
committed
test: remove flaky snapshot
1 parent fd39407 commit c40e7ae

File tree

2 files changed

+4
-55
lines changed

2 files changed

+4
-55
lines changed

src/__tests__/__snapshots__/commands.js.snap

Lines changed: 0 additions & 54 deletions
This file was deleted.

src/__tests__/commands.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
import {queries} from '@testing-library/dom'
12
import {commands} from '../'
23

34
test('exports expected commands', () => {
45
expect(commands).toMatchObject(expect.any(Array))
5-
expect(commands.map(({name}) => name)).toMatchSnapshot()
6+
const sortedQueryNames = Object.keys(queries).sort()
7+
const sortedCommandNames = commands.map(({name}) => name).sort()
8+
expect(sortedCommandNames).toEqual(sortedQueryNames)
69
commands.forEach(command =>
710
expect(command).toMatchObject({
811
name: expect.any(String),

0 commit comments

Comments
 (0)