diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f5c1797..2fe421c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,6 +12,12 @@ jobs: strategy: matrix: node: [18, 20, 'lts/*'] + os: [ubuntu-latest] + include: + - os: macos-latest + node: 'lts/*' + - os: windows-latest + node: 'lts/*' steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 diff --git a/.test.cjs b/.test.cjs new file mode 100644 index 0000000..0511ac4 --- /dev/null +++ b/.test.cjs @@ -0,0 +1,11 @@ +const plugin = require('postcss-normalize'); +const postcss = require('postcss'); +const assert = require('node:assert'); + +postcss([plugin()]).process('@import "sanitize.css"', { from: null }).then((result) => { + assert.ok(result.css.includes(':where(')); +}); + +postcss([plugin()]).process('@import "normalize.css"', { from: null }).then((result) => { + assert.ok(result.css.includes(':where(')); +}); diff --git a/.test.mjs b/.test.mjs new file mode 100644 index 0000000..c568447 --- /dev/null +++ b/.test.mjs @@ -0,0 +1,11 @@ +import plugin from 'postcss-normalize'; +import postcss from 'postcss'; +import assert from 'node:assert'; + +postcss([plugin()]).process('@import "sanitize.css"', { from: null }).then((result) => { + assert.ok(result.css.includes(':where(')); +}); + +postcss([plugin()]).process('@import "normalize.css"', { from: null }).then((result) => { + assert.ok(result.css.includes(':where(')); +}); diff --git a/package.json b/package.json index 38195c9..3e73f02 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "scripts": { "prepublishOnly": "npm test", "build": "rollup --config .rollup.mjs --silent", - "test": "npm run build && npm run tape", + "test": "npm run build && npm run tape && node .test.cjs && node .test.mjs", "tape": "postcss-tape" }, "engines": {