From ecab6c26f348a5cf528b9e887f9da82495843cfd Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Mon, 9 Dec 2024 12:12:20 +0100 Subject: [PATCH] Update dev-dependencies --- package.json | 2 +- test.js | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 2f3f0f6..1d67f9b 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "unified": "^11.0.0", "unist-builder": "^4.0.0", "unist-util-visit": "^5.0.0", - "xo": "^0.59.0" + "xo": "^0.60.0" }, "scripts": { "build": "tsc --build --clean && tsc --build && type-coverage", diff --git a/test.js b/test.js index c8c5f06..9a5fe0a 100644 --- a/test.js +++ b/test.js @@ -20,8 +20,8 @@ import {visit} from 'unist-util-visit' const {window} = new JSDOM('') // The globals needed by `rehype-dom`. -global.DOMParser = window.DOMParser -global.document = window.document +globalThis.DOMParser = window.DOMParser +globalThis.document = window.document test('rehype-dom-parse', async function (t) { const processor = unified().use(rehypeDomParse).use(rehypeStringify).freeze() @@ -127,10 +127,7 @@ test('rehype-dom-stringify', async function (t) { await t.test('should support empty fragment', async function () { assert.equal( - processor() - .data('settings', {fragment: true}) - .processSync('') - .toString(), + processor().data('settings', {fragment: true}).processSync('').toString(), '' ) })