File size: 487 Bytes
3206347
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { describe, it, expect } from 'vitest';
import App from '../models/app';
import authSerializer from './auth';

describe('authSerializer', () => {
  it('should return auth data', async () => {
    const auth = await App.findAuthByKey('deepl');

    const expectedPayload = {
      fields: auth.fields,
      authenticationSteps: auth.authenticationSteps,
      reconnectionSteps: auth.reconnectionSteps,
    };

    expect(authSerializer(auth)).toEqual(expectedPayload);
  });
});