Skip to content

Commit

Permalink
fix lint and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Nov 1, 2022
1 parent 99f951a commit bd8440b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/next/server/node-web-streams-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function createHeadInsertionTransformStream(
let inserted = false
let freezing = false
const queueTask =
process.env.NEXT_RUNTIME === 'edge' ? setTimeout : setImmediate
process.env.NEXT_RUNTIME === 'edge' ? globalThis.setTimeout : setImmediate
return new TransformStream({
async transform(chunk, controller) {
const content = decodeText(chunk)
Expand Down
6 changes: 1 addition & 5 deletions test/e2e/app-dir/rsc-errors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { check, fetchViaHTTP, renderViaHTTP } from 'next-test-utils'
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'

describe('app dir - rsc basics', () => {
describe('app dir - rsc errors', () => {
let next: NextInstance

const { isNextDeploy, isNextDev } = global as any
Expand Down Expand Up @@ -88,10 +88,6 @@ describe('app dir - rsc basics', () => {
expect(html).toContain(
'This module cannot be imported from a Server Component module. It should only be used from a Client Component.'
)
// css-in-js like styled-jsx in server components won't be transformed
expect(html).toMatch(
/<style>\s*\.this-wont-be-transformed\s*\{\s*color:\s*purple;\s*\}\s*<\/style>/
)
})

it('should not transform css-in-js such as styled-jsx in server components', async () => {
Expand Down

0 comments on commit bd8440b

Please sign in to comment.