-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
...s/next-dev-tests/tests/integration/next/postcss/WEB-1016/input/node_modules/mod/style.css
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
...xt-swc/crates/next-dev-tests/tests/integration/next/postcss/WEB-1016/input/pages/_app.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import '../styles/globals.css' | ||
import type { AppProps } from 'next/app' | ||
|
||
export default function App({ Component, pageProps }: AppProps) { | ||
return <Component {...pageProps} /> | ||
} |
24 changes: 24 additions & 0 deletions
24
...t-swc/crates/next-dev-tests/tests/integration/next/postcss/WEB-1016/input/pages/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { useTestHarness } from '@turbo/pack-test-harness' | ||
|
||
export default function Home() { | ||
useTestHarness(runTests) | ||
|
||
return ( | ||
<main> | ||
<div> | ||
<button>One</button> | ||
<button className="localButton">Two</button> | ||
</div> | ||
</main> | ||
) | ||
} | ||
|
||
function runTests() { | ||
it('it should apply PostCSS styles to local and foreign code', () => { | ||
const buttons = Array.from(document.querySelectorAll('button')) | ||
|
||
expect(buttons.length).toBe(2) | ||
expect(getComputedStyle(buttons[0]).height).toBe(50) | ||
expect(getComputedStyle(buttons[1]).height).toBe(50) | ||
}) | ||
} |
3 changes: 3 additions & 0 deletions
3
...swc/crates/next-dev-tests/tests/integration/next/postcss/WEB-1016/input/postcss.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
plugins: [['postcss-preset-env']], | ||
} |
5 changes: 5 additions & 0 deletions
5
...wc/crates/next-dev-tests/tests/integration/next/postcss/WEB-1016/input/styles/globals.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@import "mod/style.css"; | ||
|
||
.localButton { | ||
height: mod(50px, 51px); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters