Commit 2fd363cd authored by Diana Zubova's avatar Diana Zubova Committed by Enrique Alcántara

Code review feedback

Replace objectContaining with toMatchObject
parent c3849c12
...@@ -12,11 +12,9 @@ describe('gfm', () => { ...@@ -12,11 +12,9 @@ describe('gfm', () => {
}, },
}); });
expect(result).toEqual( expect(result).toMatchObject({
expect.objectContaining({ type: 'root',
type: 'root', });
}),
);
}); });
it('transforms raw HTML into individual nodes in the AST', async () => { it('transforms raw HTML into individual nodes in the AST', async () => {
...@@ -29,13 +27,11 @@ describe('gfm', () => { ...@@ -29,13 +27,11 @@ describe('gfm', () => {
}, },
}); });
expect(result.children[0].children[0]).toEqual( expect(result.children[0].children[0]).toMatchObject({
expect.objectContaining({ type: 'element',
type: 'element', tagName: 'strong',
tagName: 'strong', properties: {},
properties: {}, });
}),
);
}); });
it('returns the result of executing the renderer function', async () => { it('returns the result of executing the renderer function', async () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment