Skip to content

Commit

Permalink
test(native): fix timers
Browse files Browse the repository at this point in the history
  • Loading branch information
danilowoz committed Dec 5, 2021
1 parent b20fe47 commit 4fba29c
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/native/__tests__/ContentLoader.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import * as ShallowRenderer from 'react-test-renderer/shallow'

import ContentLoader, { Circle, Rect } from '../ContentLoader'

jest.useFakeTimers()

describe('ContentLoader', () => {
describe('when type is custom', () => {
const customWrapper = renderer.create(
Expand Down
2 changes: 2 additions & 0 deletions src/native/__tests__/Svg.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ interface IPredicateArgs {
props: any
}

jest.useFakeTimers()

describe('Svg', () => {
const wrapper = renderer.create(<ContentLoader animate={false} />).root
const predicateRectClipPath = ({ type, props }: IPredicateArgs) =>
Expand Down
2 changes: 2 additions & 0 deletions src/native/__tests__/presets/BulletListStyle.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import * as renderer from 'react-test-renderer'

import BulletListStyle from '../../presets/BulletListStyle'

jest.useFakeTimers()

describe('BulletListStyle', () => {
const wrapper = renderer.create(
<BulletListStyle uniqueKey="BulletListStyle" animate={false} speed={20} />
Expand Down
2 changes: 2 additions & 0 deletions src/native/__tests__/presets/CodeStyle.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import * as renderer from 'react-test-renderer'

import CodeStyle from '../../presets/CodeStyle'

jest.useFakeTimers()

describe('CodeStyle', () => {
const wrapper = renderer.create(
<CodeStyle uniqueKey="CodeStyle" animate={false} speed={20} />
Expand Down
2 changes: 2 additions & 0 deletions src/native/__tests__/presets/FacebookStyle.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import * as renderer from 'react-test-renderer'

import FacebookStyle from '../../presets/FacebookStyle'

jest.useFakeTimers()

describe('FacebookStyle', () => {
const wrapper = renderer.create(
<FacebookStyle uniqueKey="FacebookStyle" animate={false} speed={20} />
Expand Down
2 changes: 2 additions & 0 deletions src/native/__tests__/presets/InstagramStyle.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import * as renderer from 'react-test-renderer'

import InstagramStyle from '../../presets/InstagramStyle'

jest.useFakeTimers()

describe('InstagramStyle', () => {
const wrapper = renderer.create(
<InstagramStyle uniqueKey="InstagramStyle" animate={false} speed={20} />
Expand Down
2 changes: 2 additions & 0 deletions src/native/__tests__/presets/ListStyle.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import * as renderer from 'react-test-renderer'

import ListStyle from '../../presets/ListStyle'

jest.useFakeTimers()

describe('ListStyle', () => {
const wrapper = renderer.create(
<ListStyle uniqueKey="ListStyle" animate={false} speed={20} />
Expand Down
2 changes: 2 additions & 0 deletions src/native/__tests__/snapshots.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import * as renderer from 'react-test-renderer'

import ContentLoader, { Rect } from '../ContentLoader'

jest.useFakeTimers()

describe('ContentLoader snapshots', () => {
test('renders correctly the basic version', () => {
const wrapper = renderer.create(
Expand Down

0 comments on commit 4fba29c

Please sign in to comment.