Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinMalfait committed Oct 10, 2024
1 parent b2dab05 commit 3a62eb0
Showing 1 changed file with 30 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,42 @@ it('should migrate a built-in breakpoint', async () => {
}
`),
).toMatchInlineSnapshot(`
"@media (width >= 48rem) {
"@media (width >= theme(--breakpoint-md)) {
.foo {
color: red;
}
}"
`)
})

it('should migrate a custom min-width screen', async () => {
it('should migrate a custom min-width screen (string)', async () => {
expect(
await migrate(
css`
@media screen(foo) {
.foo {
color: red;
}
}
`,
{
theme: {
screens: {
foo: '123px',
},
},
},
),
).toMatchInlineSnapshot(`
"@media (width >= theme(--breakpoint-foo)) {
.foo {
color: red;
}
}"
`)
})

it('should migrate a custom min-width screen (object)', async () => {
expect(
await migrate(
css`
Expand All @@ -60,7 +87,7 @@ it('should migrate a custom min-width screen', async () => {
},
),
).toMatchInlineSnapshot(`
"@media (width >= 123px) {
"@media (width >= theme(--breakpoint-foo)) {
.foo {
color: red;
}
Expand Down

0 comments on commit 3a62eb0

Please sign in to comment.