Skip to content

Commit

Permalink
Enable ReactRefreshLogBox scss test (#44180)
Browse files Browse the repository at this point in the history
## 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)
  • Loading branch information
hanneslund committed Dec 20, 2022
1 parent 5a35be1 commit 9203386
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
Expand Up @@ -4,9 +4,7 @@ import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import path from 'path'

// TODO: figure out why snapshots mismatch on GitHub actions
// specifically but work in docker and locally
describe.skip('ReactRefreshLogBox app', () => {
describe('ReactRefreshLogBox app', () => {
let next: NextInstance

beforeAll(async () => {
Expand Down Expand Up @@ -48,6 +46,10 @@ describe.skip('ReactRefreshLogBox app', () => {
const source = await session.getRedboxSource()
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
await session.patch('index.module.scss', `button { font-size: 5px; }`)
expect(await session.hasRedbox(true)).toBe(true)
Expand Down
@@ -0,0 +1,19 @@
// 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; }
| ^"
`;

0 comments on commit 9203386

Please sign in to comment.