mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 16:44:07 -08:00
75a5807c72
Before: `17.949 s` After: `3.886 s` Followup to: https://github.com/n8n-io/n8n/pull/7797#discussion_r1404148034
16 lines
543 B
TypeScript
16 lines
543 B
TypeScript
import type { PublicUser } from '@/Interfaces';
|
|
|
|
export const validateUser = (user: PublicUser) => {
|
|
expect(typeof user.id).toBe('string');
|
|
expect(user.email).toBeDefined();
|
|
expect(user.firstName).toBeDefined();
|
|
expect(user.lastName).toBeDefined();
|
|
expect(typeof user.isOwner).toBe('boolean');
|
|
expect(user.isPending).toBe(false);
|
|
expect(user.signInType).toBe('email');
|
|
expect(user.settings).toBe(null);
|
|
expect(user.personalizationAnswers).toBeNull();
|
|
expect(user.password).toBeUndefined();
|
|
expect(user.globalRole).toBeDefined();
|
|
};
|