Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
jgerigmeyer committed Oct 15, 2024
1 parent ce662ea commit 2895255
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/unit/transform.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('transformCSS', () => {

it('parses and removes new anchor positioning CSS after transformation to JS', async () => {
document.head.innerHTML = `
<link type="text/css" href="/sample.css" data-link="true" />
<link type="text/css" href="/sample.css" data-link="true" crossorigin="anonymous" />
<style>
p { color: red; }
</style>
Expand Down Expand Up @@ -43,6 +43,7 @@ describe('transformCSS', () => {

expect(link.href).toContain('/updated.css');
expect(link.getAttribute('data-link')).toBe('true');
expect(link.getAttribute('crossorigin')).toBeNull();
expect(style.innerHTML).toBe('html { padding: 0; }');
expect(div.getAttribute('style')).toBe('--foo: var(--bar); color:blue;');
expect(div2.getAttribute('style')).toBe('color: red;');
Expand Down

0 comments on commit 2895255

Please sign in to comment.