diff --git a/lib/utils/__tests__/isStandardSyntaxDeclaration.test.js b/lib/utils/__tests__/isStandardSyntaxDeclaration.test.js index 5e145f0546..8c928ee3aa 100644 --- a/lib/utils/__tests__/isStandardSyntaxDeclaration.test.js +++ b/lib/utils/__tests__/isStandardSyntaxDeclaration.test.js @@ -168,13 +168,7 @@ describe('isStandardSyntaxDeclaration', () => { }); it('supports root-level declarations', () => { - const doc = new postcss.Document(); - const root = postcss.parse('color: yellow;'); - - root.parent = doc; - doc.nodes.push(root); - - expect(isStandardSyntaxDeclaration(root.nodes[0])).toBe(true); + expect(isStandardSyntaxDeclaration(decl('color: yellow;'))).toBe(true); }); });