diff --git a/playground/nuxt2-vite/module.test.ts b/playground/nuxt2-vite/module.test.ts deleted file mode 100644 index dd00df4..0000000 --- a/playground/nuxt2-vite/module.test.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { describe, test, expect } from 'vitest' -import cheerio from 'cheerio' - -const fs = require('node:fs') -const execa = require('execa') -const path = require('pathe') - -describe('nuxt2-vite', () => { - test('index html transformed correctly', async () => { - // Note: this is a hacky solution - await execa('pnpm', ['generate'], { cwd: __dirname }) - - const html = fs.readFileSync(path.join(__dirname, 'dist', 'index.html'), 'utf-8') - - const $ = cheerio.load(html) - $('style').each((i, $s) => { - const html = $($s).html() - expect(html).not.toContain('@apply') - if (html) { - expect(html).toMatchSnapshot('script-' + i) - } - }) - }) -}) diff --git a/playground/nuxt2-webpack/module.test.ts b/playground/nuxt2-webpack/module.test.ts deleted file mode 100644 index 129626a..0000000 --- a/playground/nuxt2-webpack/module.test.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { describe, test, expect } from 'vitest' -import cheerio from 'cheerio' -import execa from 'execa' - -const fs = require('node:fs') -const path = require('pathe') - -describe('nuxt2-webpack', () => { - test('index html transformed correctly', async () => { - // Note: this is a hacky solution - await execa('pnpm', ['generate'], { cwd: __dirname }) - - const html = fs.readFileSync(path.join(__dirname, 'dist', 'index.html'), 'utf-8') - - const $ = cheerio.load(html) - $('style').each((i, $s) => { - const html = $($s).html() - expect(html).not.toContain('@apply') - }) - }) -}) diff --git a/playground/nuxt3/nuxt3.test.ts b/playground/nuxt3/nuxt3.test.ts index 5a24a7a..9dc2ae2 100644 --- a/playground/nuxt3/nuxt3.test.ts +++ b/playground/nuxt3/nuxt3.test.ts @@ -1,10 +1,8 @@ import { describe, test, expect } from 'vitest' -import cheerio from 'cheerio' import { globby } from 'globby' - -const fs = require('node:fs') -const execa = require('execa') -const path = require('pathe') +import fs from 'fs' +import { execa } from 'execa' +import path from 'pathe' describe('nuxt3', () => { test('renders css files without @apply', async () => {