Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,8 @@ jobs:
CARGO_PROFILE_RELEASE_LTO: 'off'
CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER: 'lld-link'

- name: Test ${{ matrix.integration }} 1/3
run: pnpm run test:integrations ./integrations/${{ matrix.integration }} --shard 1/3
env:
GITHUB_WORKSPACE: ${{ github.workspace }}

- name: Test ${{ matrix.integration }} 2/3
run: pnpm run test:integrations ./integrations/${{ matrix.integration }} --shard 2/3
env:
GITHUB_WORKSPACE: ${{ github.workspace }}

- name: Test ${{ matrix.integration }} 3/3
run: pnpm run test:integrations ./integrations/${{ matrix.integration }} --shard 3/3
- name: Test ${{ matrix.integration }}
run: pnpm run test:integrations ./integrations/${{ matrix.integration }}
env:
GITHUB_WORKSPACE: ${{ github.workspace }}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"tsup": "^8.5.0",
"turbo": "^2.5.4",
"typescript": "^5.5.4",
"vitest": "^2.0.5"
"vitest": "^4.0.3"
},
"packageManager": "pnpm@9.6.0",
"pnpm": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
.then((result) => result.css)
}

it('should not migrate `@apply`, when there are no issues', async () => {

Check failure on line 31 in packages/@tailwindcss-upgrade/src/codemods/css/migrate-at-apply.test.ts

View workflow job for this annotation

GitHub Actions / Windows

src/codemods/css/migrate-at-apply.test.ts > should not migrate `@apply`, when there are no issues

Error: Test timed out in 5000ms. If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout". ❯ src/codemods/css/migrate-at-apply.test.ts:31:1
expect(
await migrate(css`
.foo {
Expand Down Expand Up @@ -71,7 +71,7 @@
`)
})

it('should move the legacy `!` prefix, to the new `!` postfix notation', async () => {

Check failure on line 74 in packages/@tailwindcss-upgrade/src/codemods/css/migrate-at-apply.test.ts

View workflow job for this annotation

GitHub Actions / macOS

src/codemods/css/migrate-at-apply.test.ts > should move the legacy `!` prefix, to the new `!` postfix notation

Error: Test timed out in 5000ms. If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout". ❯ src/codemods/css/migrate-at-apply.test.ts:74:1
expect(
await migrate(css`
.foo {
Expand All @@ -85,35 +85,39 @@
`)
})

it('should apply all candidate migration when migrating with a config', async () => {
async function migrateWithPrefix(input: string) {
return postcss()
.use(
migrateAtApply({
designSystem: await __unstable__loadDesignSystem(
css`
@import 'tailwindcss' prefix(tw);
`,
{ base: __dirname },
),
userConfig: {
prefix: 'tw_',
},
}),
)
.process(input, { from: expect.getState().testPath })
.then((result) => result.css)
}
it(

Check failure on line 88 in packages/@tailwindcss-upgrade/src/codemods/css/migrate-at-apply.test.ts

View workflow job for this annotation

GitHub Actions / macOS

src/codemods/css/migrate-at-apply.test.ts > should apply all candidate migration when migrating with a config

Error: Test timed out in 10000ms. If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout". ❯ src/codemods/css/migrate-at-apply.test.ts:88:1

Check failure on line 88 in packages/@tailwindcss-upgrade/src/codemods/css/migrate-at-apply.test.ts

View workflow job for this annotation

GitHub Actions / Windows

src/codemods/css/migrate-at-apply.test.ts > should apply all candidate migration when migrating with a config

Error: Test timed out in 10000ms. If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout". ❯ src/codemods/css/migrate-at-apply.test.ts:88:1
'should apply all candidate migration when migrating with a config',
{ timeout: 10_000 },
async () => {
async function migrateWithPrefix(input: string) {
return postcss()
.use(
migrateAtApply({
designSystem: await __unstable__loadDesignSystem(
css`
@import 'tailwindcss' prefix(tw);
`,
{ base: __dirname },
),
userConfig: {
prefix: 'tw_',
},
}),
)
.process(input, { from: expect.getState().testPath })
.then((result) => result.css)
}

expect(
await migrateWithPrefix(css`
.foo {
@apply !tw_flex [color:--my-color] tw_bg-gradient-to-t;
}
`),
).toMatchInlineSnapshot(`
expect(
await migrateWithPrefix(css`
.foo {
@apply !tw_flex [color:--my-color] tw_bg-gradient-to-t;
}
`),
).toMatchInlineSnapshot(`
".foo {
@apply tw:flex! tw:text-(--my-color) tw:bg-linear-to-t;
}"
`)
})
},
)
Loading
Loading