mirror of
https://github.com/apache/superset.git
synced 2024-09-18 19:49:37 -04:00
test: Convert DatasetList test from jsx to tsx (#22971)
This commit is contained in:
parent
5b5b534e89
commit
b1296a195c
@ -84,7 +84,7 @@ fetchMock.get(databaseEndpoint, {
|
|||||||
result: [],
|
result: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
async function mountAndWait(props) {
|
async function mountAndWait(props: {}) {
|
||||||
const mounted = mount(
|
const mounted = mount(
|
||||||
<Provider store={store}>
|
<Provider store={store}>
|
||||||
<DatasetList {...props} user={mockUser} />
|
<DatasetList {...props} user={mockUser} />
|
||||||
@ -97,7 +97,7 @@ async function mountAndWait(props) {
|
|||||||
|
|
||||||
describe('DatasetList', () => {
|
describe('DatasetList', () => {
|
||||||
const mockedProps = {};
|
const mockedProps = {};
|
||||||
let wrapper;
|
let wrapper: any;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
wrapper = await mountAndWait(mockedProps);
|
wrapper = await mountAndWait(mockedProps);
|
||||||
@ -255,7 +255,10 @@ describe('RTL', () => {
|
|||||||
return mounted;
|
return mounted;
|
||||||
}
|
}
|
||||||
|
|
||||||
let isFeatureEnabledMock;
|
let isFeatureEnabledMock: jest.SpyInstance<
|
||||||
|
boolean,
|
||||||
|
[feature: featureFlags.FeatureFlag]
|
||||||
|
>;
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
isFeatureEnabledMock = jest
|
isFeatureEnabledMock = jest
|
||||||
.spyOn(featureFlags, 'isFeatureEnabled')
|
.spyOn(featureFlags, 'isFeatureEnabled')
|
Loading…
Reference in New Issue
Block a user