From a6b62254e43e165fca8ccca168fa5f15a7661c15 Mon Sep 17 00:00:00 2001 From: Mohamed <10786768+xMohamd@users.noreply.github.com> Date: Thu, 8 Feb 2024 12:22:40 +0200 Subject: [PATCH] chore: Migrate error-bad-js.test.js to node:test (#10037) --- .../{error-bad-js.test.js => error-bad-js.nodetest.js} | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename packages/astro/test/{error-bad-js.test.js => error-bad-js.nodetest.js} (75%) diff --git a/packages/astro/test/error-bad-js.test.js b/packages/astro/test/error-bad-js.nodetest.js similarity index 75% rename from packages/astro/test/error-bad-js.test.js rename to packages/astro/test/error-bad-js.nodetest.js index dc04016f50..43e35ee950 100644 --- a/packages/astro/test/error-bad-js.test.js +++ b/packages/astro/test/error-bad-js.nodetest.js @@ -1,4 +1,5 @@ -import { expect } from 'chai'; +import assert from 'node:assert/strict'; +import { after, describe, before, it } from 'node:test'; import { loadFixture } from './test-utils.js'; describe('Errors in JavaScript', () => { @@ -26,11 +27,11 @@ describe('Errors in JavaScript', () => { let res = await fixture.fetch('/'); let html = await res.text(); - expect(html).to.include('ReferenceError'); + assert.equal(html.includes('ReferenceError'), true) res = await fixture.fetch('/'); await res.text(); - expect(html).to.include('ReferenceError'); + assert.equal(html.includes('ReferenceError'), true) }); });