diff options
Diffstat (limited to 'packages/integrations/vue/test/app-entrypoint-css.test.js')
-rw-r--r-- | packages/integrations/vue/test/app-entrypoint-css.test.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/packages/integrations/vue/test/app-entrypoint-css.test.js b/packages/integrations/vue/test/app-entrypoint-css.test.js index e454d6d0e..692008349 100644 --- a/packages/integrations/vue/test/app-entrypoint-css.test.js +++ b/packages/integrations/vue/test/app-entrypoint-css.test.js @@ -1,5 +1,6 @@ import { loadFixture } from './test-utils.js'; -import { expect } from 'chai'; +import * as assert from 'node:assert/strict'; +import { describe, it, before, after } from 'node:test'; import { load as cheerioLoad } from 'cheerio'; describe('App Entrypoint CSS', () => { @@ -22,18 +23,17 @@ describe('App Entrypoint CSS', () => { const $ = cheerioLoad(html); // test 1: basic component renders - expect($('#foo > #bar').text()).to.eq('works'); - + assert.equal($('#foo > #bar').text(), 'works'); // test 2: injects the global style on the page - expect($('style').first().text().trim()).to.eq(':root{background-color:red}'); + assert.equal($('style').first().text().trim(), ':root{background-color:red}'); }); it('does not inject styles to pages without a Vue component', async () => { const html = await fixture.readFile('/unrelated/index.html'); const $ = cheerioLoad(html); - expect($('style').length).to.eq(0); - expect($('link[rel="stylesheet"]').length).to.eq(0); + assert.equal($('style').length, 0); + assert.equal($('link[rel="stylesheet"]').length, 0); }); }); @@ -51,17 +51,17 @@ describe('App Entrypoint CSS', () => { const $ = cheerioLoad(html); // test 1: basic component renders - expect($('#foo > #bar').text()).to.eq('works'); + assert.equal($('#foo > #bar').text(), 'works'); // test 2: injects the global style on the page - expect($('style').first().text().replace(/\s+/g, '')).to.eq(':root{background-color:red;}'); + assert.equal($('style').first().text().replace(/\s+/g, ''), ':root{background-color:red;}'); }); it('does not inject styles to pages without a Vue component', async () => { const html = await fixture.fetch('/unrelated').then((res) => res.text()); const $ = cheerioLoad(html); - expect($('style').length).to.eq(0); - expect($('link[rel="stylesheet"]').length).to.eq(0); + assert.equal($('style').length, 0); + assert.equal($('link[rel="stylesheet"]').length, 0); }); }); }); |