diff --git a/packages/integrations/tailwind/package.json b/packages/integrations/tailwind/package.json index c07f65963b..add6641eab 100644 --- a/packages/integrations/tailwind/package.json +++ b/packages/integrations/tailwind/package.json @@ -30,7 +30,7 @@ "build": "astro-scripts build \"src/**/*.ts\" && tsc", "build:ci": "astro-scripts build \"src/**/*.ts\"", "dev": "astro-scripts dev \"src/**/*.ts\"", - "test": "mocha --exit --timeout 20000 test/" + "test": "astro-scripts test \"test/**/*.test.js\"" }, "dependencies": { "autoprefixer": "^10.4.15", @@ -40,8 +40,6 @@ "devDependencies": { "astro": "workspace:*", "astro-scripts": "workspace:*", - "chai": "^4.3.7", - "mocha": "^10.2.0", "tailwindcss": "^3.3.5", "vite": "^5.0.12" }, diff --git a/packages/integrations/tailwind/test/basic.test.js b/packages/integrations/tailwind/test/basic.test.js index e5275c81e9..6e544eb8c7 100644 --- a/packages/integrations/tailwind/test/basic.test.js +++ b/packages/integrations/tailwind/test/basic.test.js @@ -1,4 +1,5 @@ -import { expect } from 'chai'; +import * as assert from 'node:assert/strict'; +import { describe, it, before } from 'node:test'; import { loadFixture } from '../../../astro/test/test-utils.js'; describe('Basic', () => { @@ -25,9 +26,12 @@ describe('Basic', () => { } } - expect(css).to.include('box-sizing:border-box;'); // base css - expect(css).to.include('text-red-500'); // class css - expect(css).to.match(/\.a\[data-astro-cid-.*?\] \.b\[data-astro-cid-.*?\]/); // nesting + assert.equal(css.includes('box-sizing:border-box;'), true); // base css + assert.equal(css.includes('text-red-500'), true); // class css + assert.equal( + new RegExp(/\.a\[data-astro-cid-.*?\] \.b\[data-astro-cid-.*?\]/).test(css), + true + ); // nesting }); }); }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e76d8195cf..957a0843a3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4705,12 +4705,6 @@ importers: astro-scripts: specifier: workspace:* version: link:../../../scripts - chai: - specifier: ^4.3.7 - version: 4.3.10 - mocha: - specifier: ^10.2.0 - version: 10.2.0 tailwindcss: specifier: ^3.3.5 version: 3.4.0