Skip to content

Commit fa17a4b

Browse files
committed
Add more test cases
1 parent 4f10113 commit fa17a4b

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

tests/arbitrary-properties.test.js

+16-2
Original file line numberDiff line numberDiff line change
@@ -352,13 +352,27 @@ it('should not generate invalid CSS', () => {
352352
let config = {
353353
content: [
354354
{
355-
raw: html`<div class="[https://en.wikipedia.org/wiki]"></div>`,
355+
raw: html`
356+
<div class="[https://en.wikipedia.org/wiki]"></div>
357+
<div class="[http://example.org]"></div>
358+
<div class="[http://example]"></div>
359+
<div class="[ftp://example]"></div>
360+
<div class="[stillworks:/example]"></div>
361+
`,
362+
363+
// NOTE: In this case `stillworks:/example` being generated is not ideal
364+
// but it at least doesn't produce invalid CSS when run through prettier
365+
// So we can let it through since it is technically valid
356366
},
357367
],
358368
corePlugins: { preflight: false },
359369
}
360370

361371
return run('@tailwind utilities', config).then((result) => {
362-
return expect(result.css).toMatchFormattedCss(css``)
372+
return expect(result.css).toMatchFormattedCss(css`
373+
.\[stillworks\:\/example\] {
374+
stillworks: /example;
375+
}
376+
`)
363377
})
364378
})

0 commit comments

Comments
 (0)