Skip to content

Commit

Permalink
test: Convert DatasetList test from jsx to tsx (#22971)
Browse files Browse the repository at this point in the history
  • Loading branch information
lyndsiWilliams authored Feb 15, 2023
1 parent 5b5b534 commit b1296a1
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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} />
Expand All @@ -97,7 +97,7 @@ async function mountAndWait(props) {

describe('DatasetList', () => {
const mockedProps = {};
let wrapper;
let wrapper: any;

beforeAll(async () => {
wrapper = await mountAndWait(mockedProps);
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit b1296a1

Please sign in to comment.