create-expo-cljs-app
Version:
Create a react native application with Expo and Shadow-CLJS!
31 lines (24 loc) • 1.1 kB
JavaScript
import React from 'react';
import Animated from '../../Animated';
import renderer from 'react-test-renderer';
jest.mock('../../ReanimatedEventEmitter');
jest.mock('../../ReanimatedModule');
jest.mock('../../reanimated2/NativeReanimated/NativeReanimated');
describe('Core Animated components', () => {
xit('fails if something other then a node or function that returns a node is passed to Animated.Code exec prop', () => {
console.error = jest.fn();
expect(() =>
renderer.create(<Animated.Code exec="not a node" />)
).toThrowError(
"<Animated.Code /> expects the 'exec' prop or children to be an animated node or a function returning an animated node."
);
});
xit('fails if something other then a node or function that returns a node is passed to Animated.Code children', () => {
console.error = jest.fn();
expect(() =>
renderer.create(<Animated.Code>not a node</Animated.Code>)
).toThrowError(
"<Animated.Code /> expects the 'exec' prop or children to be an animated node or a function returning an animated node."
);
});
});