Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update defaults locations in tests
  • Loading branch information
thecrypticace committed Sep 15, 2024
commit 8270a8cf0291cdb8a614ef84c08f270e16722ec9
2 changes: 1 addition & 1 deletion tests/apply.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1640,6 +1640,7 @@ it('apply partitioning works with media queries', async () => {
const result = await run(input, config)

expect(result.css).toMatchFormattedCss(css`
${defaults}
html,
body {
--tw-text-opacity: 1;
Expand All @@ -1654,7 +1655,6 @@ it('apply partitioning works with media queries', async () => {
font-size: 2rem;
}
}
${defaults}
`)
})

Expand Down
2 changes: 1 addition & 1 deletion tests/basic-usage.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,11 +460,11 @@ it('does not produce duplicate output when seeing variants preceding a wildcard
* {
color: #00f;
}
${defaults}
.combined,
* {
color: red;
}
${defaults}
.underline {
text-decoration-line: underline;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/collapse-adjacent-rules.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ test('collapse adjacent rules', () => {

return run(input, config).then((result) => {
expect(result.css).toMatchFormattedCss(css`
${defaults}
@font-face {
font-family: Poppins;
src: url('/fonts/Poppins.woff2') format('woff2'), url('/fonts/Poppins.woff') format('woff');
Expand All @@ -79,7 +80,6 @@ test('collapse adjacent rules', () => {
src: url('/fonts/ProximaNova.woff2') format('woff2'),
url('/fonts/ProximaNova.woff') format('woff');
}
${defaults}
@font-face {
font-family: Inter;
src: url('/fonts/Inter.woff2') format('woff2'), url('/fonts/Inter.woff') format('woff');
Expand Down
2 changes: 1 addition & 1 deletion tests/combined-selectors.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ it('should generate the partial selector, if only a partial is used (base layer)

return run(input, config).then((result) => {
return expect(result.css).toMatchFormattedCss(css`
${defaults}
:root {
font-weight: bold;
}
:root,
.a {
color: #000;
}
${defaults}
`)
})
})
Expand Down
4 changes: 2 additions & 2 deletions tests/custom-plugins.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,13 @@ test('plugins can add base styles with object syntax', () => {

return run('@tailwind base', config).then((result) => {
expect(result.css).toMatchFormattedCss(css`
${defaults}
img {
max-width: 100%;
}
button {
font-family: inherit;
}
${defaults}
`)
})
})
Expand Down Expand Up @@ -280,13 +280,13 @@ test('plugins can add base styles with raw PostCSS nodes', () => {

return run('@tailwind base', config).then((result) => {
expect(result.css).toMatchFormattedCss(css`
${defaults}
img {
max-width: 100%;
}
button {
font-family: inherit;
}
${defaults}
`)
})
})
Expand Down
2 changes: 1 addition & 1 deletion tests/import-syntax.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ test('using @import instead of @tailwind', () => {

return run(input, config).then((result) => {
expect(result.css).toMatchFormattedCss(css`
${defaults}
h1 {
font-size: 32px;
}
${defaults}
.container {
width: 100%;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/kitchen-sink.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ test('it works', () => {
}
}
}
${defaults}
h1 {
font-size: 1.5rem;
font-weight: 700;
Expand All @@ -362,7 +363,6 @@ test('it works', () => {
div {
background: #654321;
}
${defaults}
.container {
width: 100%;
}
Expand Down
6 changes: 3 additions & 3 deletions tests/layer-at-rules.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ test('comments can be used inside layers without crashing', () => {

return run(input, config).then((result) => {
expect(result.css).toMatchFormattedCss(css`
${defaults}
div {
background-color: #bada55;
}
${defaults}
.important-component,
.important-utility {
text-align: banana;
Expand Down Expand Up @@ -144,10 +144,10 @@ test('comments can be used inside layers (with important) without crashing', ()

return run(input, config).then((result) => {
expect(result.css).toMatchFormattedCss(css`
${defaults}
div {
background-color: #bada55;
}
${defaults}
.important-component {
text-align: banana;
}
Expand Down Expand Up @@ -245,6 +245,7 @@ test('layers are grouped and inserted at the matching @tailwind rule', () => {
font-weight: medium;
}
}
${defaults}
body {
margin: 0;
}
Expand All @@ -254,7 +255,6 @@ test('layers are grouped and inserted at the matching @tailwind rule', () => {
p {
font-weight: normal;
}
${defaults}
.input {
background: #fff;
}
Expand Down