test: Convert DatasetList test from jsx to tsx (#22971)

This commit is contained in:
Lyndsi Kay Williams 2023-02-15 14:09:43 -06:00 committed by GitHub
parent 5b5b534e89
commit b1296a195c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,7 +84,7 @@ fetchMock.get(databaseEndpoint, {
result: [],
});
async function mountAndWait(props) {
async function mountAndWait(props: {}) {
const mounted = mount(
<Provider store={store}>
<DatasetList {...props} user={mockUser} />
@ -97,7 +97,7 @@ async function mountAndWait(props) {
describe('DatasetList', () => {
const mockedProps = {};
let wrapper;
let wrapper: any;
beforeAll(async () => {
wrapper = await mountAndWait(mockedProps);
@ -255,7 +255,10 @@ describe('RTL', () => {
return mounted;
}
let isFeatureEnabledMock;
let isFeatureEnabledMock: jest.SpyInstance<
boolean,
[feature: featureFlags.FeatureFlag]
>;
beforeEach(async () => {
isFeatureEnabledMock = jest
.spyOn(featureFlags, 'isFeatureEnabled')