Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable ReactRefreshLogBox scss test #44180

Merged
merged 1 commit into from Dec 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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; }
| ^"
`;