Skip to content

Commit

Permalink
fixed a silly mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist committed Dec 4, 2024
1 parent 7c55920 commit 4042de8
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 15 deletions.
2 changes: 0 additions & 2 deletions packages/css/test/no-babel/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import styled from '@emotion/styled'
let consoleError = console.error

afterEach(() => {
// $FlowFixMe
console.error = consoleError
})

Expand Down Expand Up @@ -146,7 +145,6 @@ describe('css', () => {
})

const spy = jest.fn()
// $FlowFixMe
console.error = spy

expect(() =>
Expand Down
2 changes: 0 additions & 2 deletions packages/css/test/sheet.dom.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { sheet } from '@emotion/css'
const consoleError = console.error

afterEach(() => {
// $FlowFixMe
console.error = consoleError
})

Expand Down Expand Up @@ -38,7 +37,6 @@ describe('sheet', () => {
test('throws', () => {
sheet.speedy(true)
const spy = jest.fn()
// $FlowFixMe
console.error = spy
sheet.insert('.asdfasdf4###112121211{')
expect(spy.mock.calls.length).toBe(1)
Expand Down
4 changes: 0 additions & 4 deletions packages/react/__tests__/element.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
// @flow
/** @jsx jsx */
import { render } from '@testing-library/react'
import { jsx, css, CacheProvider, ThemeProvider } from '@emotion/react'
import createCache from '@emotion/cache'

// $FlowFixMe
console.error = jest.fn()

beforeEach(() => {
// $FlowFixMe
document.head.innerHTML = ''
jest.clearAllMocks()
})
Expand All @@ -18,7 +15,6 @@ describe('EmotionElement', () => {
const theme = { color: 'blue' }
const cache = createCache({ key: 'context' })

// $FlowFixMe
const Comp = ({ flag }) => (
<ThemeProvider theme={theme}>
<CacheProvider value={cache}>
Expand Down
1 change: 0 additions & 1 deletion packages/react/__tests__/get-label-from-stack-trace.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @flow
import { getLabelFromStackTrace } from '../src/get-label-from-stack-trace'

/**
Expand Down
1 change: 0 additions & 1 deletion packages/react/__tests__/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
} from '@emotion/react'
import createCache from '@emotion/cache'

// $FlowFixMe
console.error = jest.fn()

beforeEach(() => {
Expand Down
1 change: 0 additions & 1 deletion packages/react/__tests__/import-prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ expect.addSnapshotSerializer({
const render = children =>
new Promise(resolve => {
const el = document.createElement('div')
// $FlowFixMe
document.body.appendChild(el)

if (ReactDOM.createRoot) {
Expand Down
1 change: 0 additions & 1 deletion packages/react/__tests__/theme-provider.dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import * as React from 'react'
import { jsx, ThemeProvider } from '@emotion/react'

beforeEach(() => {
// $FlowFixMe
document.head.innerHTML = ''
})

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ let withEmotionCache = function withEmotionCache<Props, RefType = any>(
ref?: React.ForwardedRef<RefType>
) => React.ReactNode
):
| React.FC<React.PropsWithoutRef<Props> & React.Ref<RefType>>
| React.FC<React.PropsWithoutRef<Props> & React.RefAttributes<RefType>>
| React.ForwardRefExoticComponent<
React.PropsWithoutRef<Props> & React.RefAttributes<RefType>
> {
Expand Down
1 change: 0 additions & 1 deletion packages/react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ if (isDevelopment) {
if (isBrowser && !isTestEnv) {
// globalThis has wide browser support - https://caniuse.com/?search=globalThis, Node.js 12 and later
const globalContext: Record<string, unknown> =
// $FlowIgnore
typeof globalThis !== 'undefined'
? globalThis // eslint-disable-line no-undef
: isBrowser
Expand Down
1 change: 0 additions & 1 deletion packages/sheet/__tests__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ describe('StyleSheet', () => {

test('should work with a ShadowRoot container', () => {
const div = document.createElement('div')
// $FlowFixMe
document.body.appendChild(div)
const container = div.attachShadow({ mode: 'open' })
const sheet = new StyleSheet({ ...defaultOptions, container })
Expand Down

0 comments on commit 4042de8

Please sign in to comment.