Skip to content

Commit 4fba29c

Browse files
committed
test(native): fix timers
1 parent b20fe47 commit 4fba29c

File tree

8 files changed

+16
-0
lines changed

8 files changed

+16
-0
lines changed

src/native/__tests__/ContentLoader.test.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import * as ShallowRenderer from 'react-test-renderer/shallow'
55

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

8+
jest.useFakeTimers()
9+
810
describe('ContentLoader', () => {
911
describe('when type is custom', () => {
1012
const customWrapper = renderer.create(

src/native/__tests__/Svg.test.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ interface IPredicateArgs {
99
props: any
1010
}
1111

12+
jest.useFakeTimers()
13+
1214
describe('Svg', () => {
1315
const wrapper = renderer.create(<ContentLoader animate={false} />).root
1416
const predicateRectClipPath = ({ type, props }: IPredicateArgs) =>

src/native/__tests__/presets/BulletListStyle.test.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import * as renderer from 'react-test-renderer'
55

66
import BulletListStyle from '../../presets/BulletListStyle'
77

8+
jest.useFakeTimers()
9+
810
describe('BulletListStyle', () => {
911
const wrapper = renderer.create(
1012
<BulletListStyle uniqueKey="BulletListStyle" animate={false} speed={20} />

src/native/__tests__/presets/CodeStyle.test.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import * as renderer from 'react-test-renderer'
55

66
import CodeStyle from '../../presets/CodeStyle'
77

8+
jest.useFakeTimers()
9+
810
describe('CodeStyle', () => {
911
const wrapper = renderer.create(
1012
<CodeStyle uniqueKey="CodeStyle" animate={false} speed={20} />

src/native/__tests__/presets/FacebookStyle.test.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import * as renderer from 'react-test-renderer'
55

66
import FacebookStyle from '../../presets/FacebookStyle'
77

8+
jest.useFakeTimers()
9+
810
describe('FacebookStyle', () => {
911
const wrapper = renderer.create(
1012
<FacebookStyle uniqueKey="FacebookStyle" animate={false} speed={20} />

src/native/__tests__/presets/InstagramStyle.test.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import * as renderer from 'react-test-renderer'
55

66
import InstagramStyle from '../../presets/InstagramStyle'
77

8+
jest.useFakeTimers()
9+
810
describe('InstagramStyle', () => {
911
const wrapper = renderer.create(
1012
<InstagramStyle uniqueKey="InstagramStyle" animate={false} speed={20} />

src/native/__tests__/presets/ListStyle.test.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import * as renderer from 'react-test-renderer'
55

66
import ListStyle from '../../presets/ListStyle'
77

8+
jest.useFakeTimers()
9+
810
describe('ListStyle', () => {
911
const wrapper = renderer.create(
1012
<ListStyle uniqueKey="ListStyle" animate={false} speed={20} />

src/native/__tests__/snapshots.test.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import * as renderer from 'react-test-renderer'
33

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

6+
jest.useFakeTimers()
7+
68
describe('ContentLoader snapshots', () => {
79
test('renders correctly the basic version', () => {
810
const wrapper = renderer.create(

0 commit comments

Comments
 (0)