0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00

chore: Migrate error-non-error.test.js to node:test (#10039)

This commit is contained in:
Mohamed 2024-02-08 12:21:53 +02:00 committed by GitHub
parent 9e3487e13c
commit 98e5f2202f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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'; import { loadFixture } from './test-utils.js';
describe('Can handle errors that are not instanceof Error', () => { 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 res = await fixture.fetch('/');
let html = await res.text(); let html = await res.text();
expect(html).to.include('Error'); assert.equal(html.includes('Error'), true);
res = await fixture.fetch('/'); res = await fixture.fetch('/');
await res.text(); await res.text();
expect(html).to.include('Error'); assert.equal(html.includes('Error'), true);
}); });
}); });