Skip to content

Commit

Permalink
Fix test type issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Temzasse committed Nov 1, 2022
1 parent 2b7705e commit aea6220
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/tests/index.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import React from 'react';
import { render } from '@testing-library/react-native';
import { createStitches } from '../internals';
import { createStitches as _createStitches } from '../internals';
import type { CreateStitches } from '../types';

// NOTE: the JSDoc types from the internal `createStitches` are not working properly
const createStitches = _createStitches as CreateStitches;

describe('Basic', () => {
it('Functionality of styled()', () => {
Expand All @@ -15,8 +19,8 @@ describe('Basic', () => {
const { toJSON } = render(<Comp />);
const result = toJSON();

expect(result.type).toEqual('View');
expect(result.props.style[0]).toMatchObject({
expect(result?.type).toEqual('View');
expect(result?.props.style[0]).toMatchObject({
backgroundColor: 'red',
height: 100,
width: 100,
Expand Down

0 comments on commit aea6220

Please sign in to comment.