Skip to content

Commit

Permalink
Fix plugins test
Browse files Browse the repository at this point in the history
  • Loading branch information
bradlc committed Mar 29, 2023
1 parent 41f30ca commit dfadcf7
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 23 deletions.
17 changes: 0 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"@prettier/plugin-pug": "^2.3.0",
"@shopify/prettier-plugin-liquid": "^1.0.3",
"@shufo/prettier-plugin-blade": "^1.8.4",
"@tailwindcss/line-clamp": "^0.3.0",
"@trivago/prettier-plugin-sort-imports": "^3.4.0",
"clear-module": "^4.1.2",
"cpy-cli": "^3.1.1",
Expand Down
1 change: 0 additions & 1 deletion scripts/copy-licenses.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const fs = require('fs')
const path = require('path')

let exclude = [
'@tailwindcss/line-clamp',
'cpy-cli',
'esbuild',
'jest',
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/plugins/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div class="sm:line-clamp-2 line-clamp-1 uppercase"></div>
<div class="sm:bar foo uppercase"></div>
13 changes: 11 additions & 2 deletions tests/fixtures/plugins/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
const plugin = require("tailwindcss/plugin");

module.exports = {
plugins: [require('@tailwindcss/line-clamp')],
}
plugins: [
plugin(function ({ addUtilities }) {
addUtilities({
".foo": { color: "red" },
".bar": { color: "blue" },
});
}),
],
};
2 changes: 1 addition & 1 deletion tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,6 @@ test('explicit config path', () => {

test('plugins', () => {
expect(formatFixture('plugins')).toEqual(
'<div class="uppercase line-clamp-1 sm:line-clamp-2"></div>'
'<div class="uppercase foo sm:bar"></div>'
)
})

0 comments on commit dfadcf7

Please sign in to comment.