0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-06 22:10:10 -05:00

chore(@astrojs/integrations/tailwind): use Node.js for testing (#9875)

* chore(@astrojs/integrations/tailwind): use Node.js for testing

* chore: update pnpm lock
This commit is contained in:
Furkan Erdem 2024-01-30 18:17:32 +03:00 committed by GitHub
parent 2adf3b56eb
commit 202d3fbaa9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 13 deletions

View file

@ -30,7 +30,7 @@
"build": "astro-scripts build \"src/**/*.ts\" && tsc", "build": "astro-scripts build \"src/**/*.ts\" && tsc",
"build:ci": "astro-scripts build \"src/**/*.ts\"", "build:ci": "astro-scripts build \"src/**/*.ts\"",
"dev": "astro-scripts dev \"src/**/*.ts\"", "dev": "astro-scripts dev \"src/**/*.ts\"",
"test": "mocha --exit --timeout 20000 test/" "test": "astro-scripts test \"test/**/*.test.js\""
}, },
"dependencies": { "dependencies": {
"autoprefixer": "^10.4.15", "autoprefixer": "^10.4.15",
@ -40,8 +40,6 @@
"devDependencies": { "devDependencies": {
"astro": "workspace:*", "astro": "workspace:*",
"astro-scripts": "workspace:*", "astro-scripts": "workspace:*",
"chai": "^4.3.7",
"mocha": "^10.2.0",
"tailwindcss": "^3.3.5", "tailwindcss": "^3.3.5",
"vite": "^5.0.12" "vite": "^5.0.12"
}, },

View file

@ -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'; import { loadFixture } from '../../../astro/test/test-utils.js';
describe('Basic', () => { describe('Basic', () => {
@ -25,9 +26,12 @@ describe('Basic', () => {
} }
} }
expect(css).to.include('box-sizing:border-box;'); // base css assert.equal(css.includes('box-sizing:border-box;'), true); // base css
expect(css).to.include('text-red-500'); // class css assert.equal(css.includes('text-red-500'), true); // class css
expect(css).to.match(/\.a\[data-astro-cid-.*?\] \.b\[data-astro-cid-.*?\]/); // nesting assert.equal(
new RegExp(/\.a\[data-astro-cid-.*?\] \.b\[data-astro-cid-.*?\]/).test(css),
true
); // nesting
}); });
}); });
}); });

View file

@ -4705,12 +4705,6 @@ importers:
astro-scripts: astro-scripts:
specifier: workspace:* specifier: workspace:*
version: link:../../../scripts version: link:../../../scripts
chai:
specifier: ^4.3.7
version: 4.3.10
mocha:
specifier: ^10.2.0
version: 10.2.0
tailwindcss: tailwindcss:
specifier: ^3.3.5 specifier: ^3.3.5
version: 3.4.0 version: 3.4.0