Skip to content

Commit

Permalink
Add more test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
thecrypticace committed Jan 31, 2022
1 parent 53865e4 commit a6b9965
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions tests/arbitrary-properties.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,13 +352,27 @@ it('should not generate invalid CSS', () => {
let config = {
content: [
{
raw: html`<div class="[https://en.wikipedia.org/wiki]"></div>`,
raw: html`
<div class="[https://en.wikipedia.org/wiki]"></div>
<div class="[http://example.org]"></div>
<div class="[http://example]"></div>
<div class="[ftp://example]"></div>
<div class="[stillworks:/example]"></div>
`,

// NOTE: In this case `stillworks:/example` being generated is not ideal
// but it at least doesn't produce invalid CSS when run through prettier
// So we can let it through since it is technically valid
},
],
corePlugins: { preflight: false },
}

return run('@tailwind utilities', config).then((result) => {
return expect(result.css).toMatchFormattedCss(css``)
return expect(result.css).toMatchFormattedCss(css`
.\[stillworks\:\/example\] {
stillworks: /example;
}
`)
})
})

0 comments on commit a6b9965

Please sign in to comment.