Skip to content

Commit 74f93ca

Browse files
Convert DatasetList test from jsx to tsx
1 parent 4b05a1e commit 74f93ca

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

superset-frontend/src/views/CRUD/data/dataset/DatasetList.test.jsx renamed to superset-frontend/src/views/CRUD/data/dataset/DatasetList.test.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ fetchMock.get(databaseEndpoint, {
8484
result: [],
8585
});
8686

87-
async function mountAndWait(props) {
87+
async function mountAndWait(props: {}) {
8888
const mounted = mount(
8989
<Provider store={store}>
9090
<DatasetList {...props} user={mockUser} />
@@ -97,7 +97,7 @@ async function mountAndWait(props) {
9797

9898
describe('DatasetList', () => {
9999
const mockedProps = {};
100-
let wrapper;
100+
let wrapper: any;
101101

102102
beforeAll(async () => {
103103
wrapper = await mountAndWait(mockedProps);
@@ -255,7 +255,10 @@ describe('RTL', () => {
255255
return mounted;
256256
}
257257

258-
let isFeatureEnabledMock;
258+
let isFeatureEnabledMock: jest.SpyInstance<
259+
boolean,
260+
[feature: featureFlags.FeatureFlag]
261+
>;
259262
beforeEach(async () => {
260263
isFeatureEnabledMock = jest
261264
.spyOn(featureFlags, 'isFeatureEnabled')

0 commit comments

Comments
 (0)