Skip to content

Commit

Permalink
assetRelativePathInSnapshot-test: use act-wrapping abstraction for cr…
Browse files Browse the repository at this point in the history
…eate

Summary:
Migrate assetRelativePathInSnapshot-test to `act`-wrapping abstraction for `react-test-renderer` `create` in preparation for React 19.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D58653908

fbshipit-source-id: 432b172348c445b1684e60cf60b6ab94d62f21e1
  • Loading branch information
robhogan authored and facebook-github-bot committed Jun 17, 2024
1 parent 50e65d4 commit 8c06a69
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@

jest.disableAutomock();

const {create} = require('../../../jest/renderer');
const View = require('../../Components/View/View');
const Image = require('../Image');
const React = require('react');
const ReactTestRenderer = require('react-test-renderer');

it('renders assets based on relative path', () => {
it('renders assets based on relative path', async () => {
expect(
ReactTestRenderer.create(
await create(
<View>
<Image source={require('./img/img1.png')} />
<Image source={require('./img/img2.png')} />
Expand Down

0 comments on commit 8c06a69

Please sign in to comment.