mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -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:
parent
2adf3b56eb
commit
202d3fbaa9
3 changed files with 9 additions and 13 deletions
|
@ -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"
|
||||
},
|
||||
|
|
|
@ -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
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue