Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Ensure all necessary expect calls are awaited
  • Loading branch information
thecrypticace committed Jun 24, 2025
commit b7e6633046608e2b4918b27ba994a6b1a12f76a2
4 changes: 2 additions & 2 deletions packages/tailwindcss/src/at-import.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ test('@layer', async () => {
})

test('supports theme(reference) imports', async () => {
expect(
await expect(
run(
css`
@tailwind utilities;
Expand Down Expand Up @@ -542,7 +542,7 @@ test('it crashes when inside a cycle', async () => {
base: '/root',
})

expect(
await expect(
run(
css`
@import 'foo.css';
Expand Down
18 changes: 9 additions & 9 deletions packages/tailwindcss/src/css-functions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('--alpha(…)', () => {
})

test('--alpha(…) errors when no arguments are used', async () => {
expect(() =>
await expect(() =>
compileCss(css`
.foo {
margin: --alpha();
Expand All @@ -35,7 +35,7 @@ describe('--alpha(…)', () => {
})

test('--alpha(…) errors when alpha value is missing', async () => {
expect(() =>
await expect(() =>
compileCss(css`
.foo {
margin: --alpha(red);
Expand All @@ -47,7 +47,7 @@ describe('--alpha(…)', () => {
})

test('--alpha(…) errors multiple arguments are used', async () => {
expect(() =>
await expect(() =>
compileCss(css`
.foo {
margin: --alpha(red / 50%, blue);
Expand Down Expand Up @@ -101,7 +101,7 @@ describe('--spacing(…)', () => {
})

test('--spacing(…) relies on `--spacing` to be defined', async () => {
expect(() =>
await expect(() =>
compileCss(css`
.foo {
margin: --spacing(4);
Expand All @@ -113,7 +113,7 @@ describe('--spacing(…)', () => {
})

test('--spacing(…) requires a single value', async () => {
expect(() =>
await expect(() =>
compileCss(css`
@theme {
--spacing: 0.25rem;
Expand All @@ -129,7 +129,7 @@ describe('--spacing(…)', () => {
})

test('--spacing(…) does not have multiple arguments', async () => {
expect(() =>
await expect(() =>
compileCss(css`
.foo {
margin: --spacing(4, 5, 6);
Expand Down Expand Up @@ -364,7 +364,7 @@ describe('--theme(…)', () => {
})

test('--theme(…) can only be used with CSS variables from your @theme', async () => {
expect(() =>
await expect(() =>
compileCss(css`
@theme {
--color-red-500: #f00;
Expand All @@ -377,7 +377,7 @@ describe('--theme(…)', () => {
`[Error: The --theme(…) function can only be used with CSS variables from your theme.]`,
)

expect(() =>
await expect(() =>
compileCss(css`
@theme {
--color-red-500: #f00;
Expand Down Expand Up @@ -789,7 +789,7 @@ describe('theme(…)', () => {
})

test('theme(colors.unknown.500)', async () =>
expect(() =>
await expect(() =>
compileCss(css`
.red {
color: theme(colors.unknown.500);
Expand Down
2 changes: 1 addition & 1 deletion packages/tailwindcss/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4363,7 +4363,7 @@ test('addBase', async () => {
})

it("should error when `layer(…)` is used, but it's not the first param", async () => {
expect(async () => {
await expect(async () => {
return await compileCss(
css`
@import './bar.css' supports(display: grid) layer(utilities);
Expand Down