Fix suggestions test types
This commit is contained in:
parent
3874d1d9ef
commit
cb26a515a2
|
@ -1,28 +1,28 @@
|
||||||
import { Map as ImmutableMap } from 'immutable';
|
import { Map as ImmutableMap } from 'immutable';
|
||||||
|
|
||||||
import { __stub } from 'soapbox/api';
|
import { __stub } from 'soapbox/api';
|
||||||
import { mockStore } from 'soapbox/jest/test-helpers';
|
import { mockStore, rootState } from 'soapbox/jest/test-helpers';
|
||||||
import rootReducer from 'soapbox/reducers';
|
import { normalizeInstance } from 'soapbox/normalizers';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
fetchSuggestions,
|
fetchSuggestions,
|
||||||
} from '../suggestions';
|
} from '../suggestions';
|
||||||
|
|
||||||
let store;
|
let store: ReturnType<typeof mockStore>;
|
||||||
let state;
|
let state;
|
||||||
|
|
||||||
describe('fetchSuggestions()', () => {
|
describe('fetchSuggestions()', () => {
|
||||||
describe('with Truth Social software', () => {
|
describe('with Truth Social software', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
state = rootReducer(undefined, {})
|
state = rootState
|
||||||
.set('instance', {
|
.set('instance', normalizeInstance({
|
||||||
version: '3.4.1 (compatible; TruthSocial 1.0.0)',
|
version: '3.4.1 (compatible; TruthSocial 1.0.0)',
|
||||||
pleroma: ImmutableMap({
|
pleroma: ImmutableMap({
|
||||||
metadata: ImmutableMap({
|
metadata: ImmutableMap({
|
||||||
features: [],
|
features: [],
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
})
|
}))
|
||||||
.set('me', '123');
|
.set('me', '123');
|
||||||
store = mockStore(state);
|
store = mockStore(state);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue