mirror of
https://github.com/withastro/astro.git
synced 2025-02-24 22:46:02 -05:00
chore: migrate static-build-frameworks.test.js
to node:test
(#10047)
This commit is contained in:
parent
4e506e0659
commit
0c246cc6dd
1 changed files with 6 additions and 5 deletions
|
@ -1,5 +1,6 @@
|
||||||
import { expect } from 'chai';
|
|
||||||
import * as cheerio from 'cheerio';
|
import * as cheerio from 'cheerio';
|
||||||
|
import assert from 'node:assert/strict';
|
||||||
|
import { before, describe, it } from 'node:test';
|
||||||
import { loadFixture, isWindows } from './test-utils.js';
|
import { loadFixture, isWindows } from './test-utils.js';
|
||||||
|
|
||||||
describe('Static build - frameworks', () => {
|
describe('Static build - frameworks', () => {
|
||||||
|
@ -18,25 +19,25 @@ describe('Static build - frameworks', () => {
|
||||||
|
|
||||||
it('can build preact', async () => {
|
it('can build preact', async () => {
|
||||||
const html = await fixture.readFile('/preact/index.html');
|
const html = await fixture.readFile('/preact/index.html');
|
||||||
expect(html).to.be.a('string');
|
assert.equal(typeof html, 'string');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('can build react', async () => {
|
it('can build react', async () => {
|
||||||
const html = await fixture.readFile('/react/index.html');
|
const html = await fixture.readFile('/react/index.html');
|
||||||
expect(html).to.be.a('string');
|
assert.equal(typeof html, 'string');
|
||||||
});
|
});
|
||||||
|
|
||||||
// SKIP: Lit polyfills the server in a way that breaks `sass` require/import
|
// SKIP: Lit polyfills the server in a way that breaks `sass` require/import
|
||||||
// Leads to CI bugs like: "Cannot read properties of undefined (reading 'length')"
|
// Leads to CI bugs like: "Cannot read properties of undefined (reading 'length')"
|
||||||
it.skip('can build lit', async () => {
|
it.skip('can build lit', async () => {
|
||||||
const html = await fixture.readFile('/lit/index.html');
|
const html = await fixture.readFile('/lit/index.html');
|
||||||
expect(html).to.be.a('string');
|
assert.equal(typeof html, 'string');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('can build nested framework usage', async () => {
|
it('can build nested framework usage', async () => {
|
||||||
const html = await fixture.readFile('/nested/index.html');
|
const html = await fixture.readFile('/nested/index.html');
|
||||||
const $ = cheerio.load(html);
|
const $ = cheerio.load(html);
|
||||||
const counter = $('.nested-counter .counter');
|
const counter = $('.nested-counter .counter');
|
||||||
expect(counter.length).to.equal(1, 'Found the counter');
|
assert.equal(counter.length, 1, 'Found the counter');
|
||||||
});
|
});
|
||||||
});
|
});
|
Loading…
Add table
Reference in a new issue