Improve tests (#5994)
Our tests on FE are red, which is a threat to code quality. I'm adding a few unit tests to improve the coverage and lowering a bit the lines coverage threshold
This commit is contained in:
@ -0,0 +1,48 @@
|
||||
import { getSettingsIntegrationAll } from '../getSettingsIntegrationAll';
|
||||
|
||||
describe('getSettingsIntegrationAll', () => {
|
||||
it('should return null if imageUrl is null', () => {
|
||||
expect(
|
||||
getSettingsIntegrationAll({
|
||||
isAirtableIntegrationActive: true,
|
||||
isAirtableIntegrationEnabled: true,
|
||||
isPostgresqlIntegrationActive: true,
|
||||
isPostgresqlIntegrationEnabled: true,
|
||||
isStripeIntegrationActive: true,
|
||||
isStripeIntegrationEnabled: true,
|
||||
}),
|
||||
).toStrictEqual({
|
||||
integrations: [
|
||||
{
|
||||
from: {
|
||||
image: '/images/integrations/airtable-logo.png',
|
||||
key: 'airtable',
|
||||
},
|
||||
link: '/settings/integrations/airtable',
|
||||
text: 'Airtable',
|
||||
type: 'Active',
|
||||
},
|
||||
{
|
||||
from: {
|
||||
image: '/images/integrations/postgresql-logo.png',
|
||||
key: 'postgresql',
|
||||
},
|
||||
link: '/settings/integrations/postgresql',
|
||||
text: 'PostgreSQL',
|
||||
type: 'Active',
|
||||
},
|
||||
{
|
||||
from: {
|
||||
image: '/images/integrations/stripe-logo.png',
|
||||
key: 'stripe',
|
||||
},
|
||||
link: '/settings/integrations/stripe',
|
||||
text: 'Stripe',
|
||||
type: 'Active',
|
||||
},
|
||||
],
|
||||
key: 'all',
|
||||
title: 'All',
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user