From 98e5f2202f42dbaf5bfc2c67993d0d7a5efd4453 Mon Sep 17 00:00:00 2001 From: Mohamed <10786768+xMohamd@users.noreply.github.com> Date: Thu, 8 Feb 2024 12:21:53 +0200 Subject: [PATCH] chore: Migrate error-non-error.test.js to node:test (#10039) --- ...rror-non-error.test.js => error-non-error.nodetest.js} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename packages/astro/test/{error-non-error.test.js => error-non-error.nodetest.js} (76%) diff --git a/packages/astro/test/error-non-error.test.js b/packages/astro/test/error-non-error.nodetest.js similarity index 76% rename from packages/astro/test/error-non-error.test.js rename to packages/astro/test/error-non-error.nodetest.js index facf996335..66c386b9c1 100644 --- a/packages/astro/test/error-non-error.test.js +++ b/packages/astro/test/error-non-error.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('Can handle errors that are not instanceof Error', () => { @@ -23,11 +24,10 @@ describe('Can handle errors that are not instanceof Error', () => { let res = await fixture.fetch('/'); let html = await res.text(); - expect(html).to.include('Error'); - + assert.equal(html.includes('Error'), true); res = await fixture.fetch('/'); await res.text(); - expect(html).to.include('Error'); + assert.equal(html.includes('Error'), true); }); });