Download next.js/test/development/sass-error/index.test.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.52 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/development/sass-error/index.test.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/development/sass-error/index.test.ts
-
curl -L -o index.test.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/development/sass-error/index.test.ts
1.52 kB
| import { nextTestSetup } from 'e2e-utils' | |
| import { assertHasRedbox, getRedboxSource } from 'next-test-utils' | |
| describe('app dir - css', () => { | |
| const { next, skipped } = nextTestSetup({ | |
| files: __dirname, | |
| skipDeployment: true, | |
| dependencies: { | |
| sass: 'latest', | |
| }, | |
| }) | |
| if (skipped) { | |
| return | |
| } | |
| describe('sass support', () => { | |
| ;(process.env.IS_TURBOPACK_TEST ? describe : describe.skip)( | |
| 'error handling', | |
| () => { | |
| it('should use original source points for sass errors', async () => { | |
| const browser = await next.browser('/sass-error') | |
| await assertHasRedbox(browser) | |
| const source = await getRedboxSource(browser) | |
| // css-loader does not report an error for this case | |
| expect(source).toMatchInlineSnapshot(` | |
| "./app/global.scss.css (45:1) | |
| Parsing css source code failed | |
| 43 | } | |
| 44 | | |
| > 45 | input.defaultCheckbox::before path { | |
| | ^ | |
| 46 | fill: currentColor; | |
| 47 | } | |
| 48 | | |
| Pseudo-elements like '::before' or '::after' can't be followed by selectors like 'Ident("path")' at [project]/app/global.scss.css:0:884 | |
| Import trace: | |
| Client Component Browser: | |
| ./app/global.scss.css [Client Component Browser] | |
| ./app/layout.js [Client Component Browser] | |
| ./app/layout.js [Server Component]" | |
| `) | |
| }) | |
| } | |
| ) | |
| }) | |
| }) | |