use oxide

- Setup the codebase to be able to use the Rust parts based on an
  environment variable: `OXIDE=1`.
- Setup some tests that run both the non-Rust and Rust version in the
  same test.
- Sort the candidates in a consistent way, to guarantee the order for
  now (especially in tests).
- Reflect sorting related changes in tests.
- Ensure tests run in both the Rust and non-Rust version. (Some tests
  are explicitly skipped when using the Rust version since we haven't
  implemented those features yet. These include: custom prefix,
  transformers and extractors).
  - `jest`
  -`OXIDE=1 jest`
This commit is contained in:
Robin Malfait 2022-11-30 00:10:15 +01:00
parent cc92ef53a6
commit b643d399db
No known key found for this signature in database
GPG key ID: 92F53D68B9041AFE
37 changed files with 3340 additions and 4691 deletions

View file

@ -14,6 +14,10 @@ test('font-size utilities can include a default line-height', () => {
return run('@tailwind utilities', config).then((result) => {
expect(result.css).toMatchCss(css`
.text-lg {
font-size: 20px;
line-height: 28px;
}
.text-md {
font-size: 16px;
line-height: 24px;
@ -21,10 +25,6 @@ test('font-size utilities can include a default line-height', () => {
.text-sm {
font-size: 12px;
}
.text-lg {
font-size: 20px;
line-height: 28px;
}
`)
})
})
@ -43,6 +43,10 @@ test('font-size utilities can include a default letter-spacing', () => {
return run('@tailwind utilities', config).then((result) => {
expect(result.css).toMatchCss(css`
.text-lg {
font-size: 20px;
letter-spacing: -0.02em;
}
.text-md {
font-size: 16px;
letter-spacing: -0.01em;
@ -50,10 +54,6 @@ test('font-size utilities can include a default letter-spacing', () => {
.text-sm {
font-size: 12px;
}
.text-lg {
font-size: 20px;
letter-spacing: -0.02em;
}
`)
})
})
@ -72,6 +72,11 @@ test('font-size utilities can include a default line-height and letter-spacing',
return run('@tailwind utilities', config).then((result) => {
expect(result.css).toMatchCss(css`
.text-lg {
font-size: 20px;
line-height: 28px;
letter-spacing: -0.02em;
}
.text-md {
font-size: 16px;
line-height: 24px;
@ -80,11 +85,6 @@ test('font-size utilities can include a default line-height and letter-spacing',
.text-sm {
font-size: 12px;
}
.text-lg {
font-size: 20px;
line-height: 28px;
letter-spacing: -0.02em;
}
`)
})
})
@ -103,6 +103,11 @@ test('font-size utilities can include a font-weight', () => {
return run('@tailwind utilities', config).then((result) => {
expect(result.css).toMatchCss(css`
.text-lg {
font-size: 20px;
line-height: 28px;
font-weight: bold;
}
.text-md {
font-size: 16px;
line-height: 24px;
@ -111,11 +116,6 @@ test('font-size utilities can include a font-weight', () => {
.text-sm {
font-size: 12px;
}
.text-lg {
font-size: 20px;
line-height: 28px;
font-weight: bold;
}
`)
})
})