Remove instance normalizer

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2023-10-27 17:48:21 +02:00
parent 3a60dee4c7
commit 59115c8dc5
12 changed files with 19 additions and 401 deletions

View File

@ -1,7 +1,7 @@
import React from 'react';
import { fireEvent, render, screen } from 'soapbox/jest/test-helpers';
import { normalizeInstance } from 'soapbox/normalizers';
import { instanceSchema } from 'soapbox/schemas';
import LoginForm from './login-form';
@ -9,7 +9,7 @@ describe('<LoginForm />', () => {
it('renders for Pleroma', () => {
const mockFn = vi.fn();
const store = {
instance: normalizeInstance({
instance: instanceSchema.parse({
version: '2.7.2 (compatible; Pleroma 2.3.0)',
}),
};
@ -22,7 +22,7 @@ describe('<LoginForm />', () => {
it('renders for Mastodon', () => {
const mockFn = vi.fn();
const store = {
instance: normalizeInstance({
instance: instanceSchema.parse({
version: '3.0.0',
}),
};

View File

@ -1,14 +1,14 @@
import React from 'react';
import { render, screen } from 'soapbox/jest/test-helpers';
import { normalizeInstance } from 'soapbox/normalizers';
import { instanceSchema } from 'soapbox/schemas';
import LoginPage from './login-page';
describe('<LoginPage />', () => {
it('renders correctly on load', () => {
const store = {
instance: normalizeInstance({
instance: instanceSchema.parse({
version: '2.7.2 (compatible; Pleroma 2.3.0)',
}),
};

View File

@ -3,12 +3,12 @@ import React from 'react';
import { __stub } from 'soapbox/api';
import { buildGroup } from 'soapbox/jest/factory';
import { render, screen, waitFor } from 'soapbox/jest/test-helpers';
import { normalizeInstance } from 'soapbox/normalizers';
import { instanceSchema } from 'soapbox/schemas';
import Search from './search';
const store = {
instance: normalizeInstance({
instance: instanceSchema.parse({
version: '3.4.1 (compatible; TruthSocial 1.0.0+unreleased)',
}),
};

View File

@ -3,7 +3,7 @@ import React from 'react';
import { buildAccount } from 'soapbox/jest/factory';
import { render, screen, waitFor } from 'soapbox/jest/test-helpers';
import { normalizeInstance } from 'soapbox/normalizers';
import { instanceSchema } from 'soapbox/schemas';
import Discover from './discover';
@ -32,7 +32,7 @@ const store: any = {
},
}),
},
instance: normalizeInstance({
instance: instanceSchema.parse({
version: '3.4.1 (compatible; TruthSocial 1.0.0)',
software: 'TRUTHSOCIAL',
}),