@yoroi/explorers
Version:
The Explorers package of Yoroi SDK
22 lines • 790 B
JavaScript
import * as React from 'react';
import { Text, View } from 'react-native';
import { render, waitFor } from '@testing-library/react-native';
import { Chain } from '@yoroi/types';
import { useExplorers } from './useExplorers';
describe('useExplorers', () => {
it('success', async () => {
const TestComponent = () => {
const explorers = useExplorers(Chain.Network.Mainnet);
return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Text, {
testID: "data"
}, JSON.stringify(explorers)));
};
const {
getByTestId
} = render( /*#__PURE__*/React.createElement(TestComponent, null));
await waitFor(() => {
expect(getByTestId('data')).toBeDefined();
});
});
});
//# sourceMappingURL=useExplorers.test.js.map