Unverified Commit 9203386f authored by Hannes Bornö's avatar Hannes Bornö Committed by GitHub

Enable ReactRefreshLogBox scss test (#44180)



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
parent 5a35be1e
...@@ -4,9 +4,7 @@ import { createNext, FileRef } from 'e2e-utils' ...@@ -4,9 +4,7 @@ import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base' import { NextInstance } from 'test/lib/next-modes/base'
import path from 'path' import path from 'path'
// TODO: figure out why snapshots mismatch on GitHub actions describe('ReactRefreshLogBox app', () => {
// specifically but work in docker and locally
describe.skip('ReactRefreshLogBox app', () => {
let next: NextInstance let next: NextInstance
beforeAll(async () => { beforeAll(async () => {
...@@ -48,6 +46,10 @@ describe.skip('ReactRefreshLogBox app', () => { ...@@ -48,6 +46,10 @@ describe.skip('ReactRefreshLogBox app', () => {
const source = await session.getRedboxSource() const source = await session.getRedboxSource()
expect(source).toMatchSnapshot() expect(source).toMatchSnapshot()
// Fix syntax error
await session.patch('index.module.scss', `.button { font-size: 5px; }`)
expect(await session.hasRedbox()).toBe(false)
// Not local error // Not local error
await session.patch('index.module.scss', `button { font-size: 5px; }`) await session.patch('index.module.scss', `button { font-size: 5px; }`)
expect(await session.hasRedbox(true)).toBe(true) expect(await session.hasRedbox(true)).toBe(true)
......
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ReactRefreshLogBox app scss syntax errors 1`] = `
"./index.module.scss
SassError: Expected expression.
╷
1 │ .button { font-size: :5px; }
│ ^
╵
index.module.scss 1:22 root stylesheet"
`;
exports[`ReactRefreshLogBox app scss syntax errors 2`] = `
"./index.module.scss:1:1
Syntax error: Selector \\"button\\" is not pure (pure selectors must contain at least one local class or id)
> 1 | button { font-size: 5px; }
| ^"
`;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment