mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 16:44:07 -08:00
5156313074
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions
Benchmark Docker Image CI / build (push) Waiting to run
31 lines
802 B
TypeScript
31 lines
802 B
TypeScript
import { randomInt } from 'n8n-workflow';
|
|
|
|
import { CredentialsEntity } from '@/databases/entities/credentials-entity';
|
|
import { Project } from '@/databases/entities/project';
|
|
import { User } from '@/databases/entities/user';
|
|
|
|
import {
|
|
randomCredentialPayload,
|
|
randomEmail,
|
|
randomName,
|
|
uniqueId,
|
|
} from '../integration/shared/random';
|
|
|
|
export const mockCredential = (): CredentialsEntity =>
|
|
Object.assign(new CredentialsEntity(), randomCredentialPayload());
|
|
|
|
export const mockUser = (): User =>
|
|
Object.assign(new User(), {
|
|
id: randomInt(1000),
|
|
email: randomEmail(),
|
|
firstName: randomName(),
|
|
lastName: randomName(),
|
|
});
|
|
|
|
export const mockProject = (): Project =>
|
|
Object.assign(new Project(), {
|
|
id: uniqueId(),
|
|
type: 'personal',
|
|
name: 'Nathan Fillion <nathan.fillion@n8n.io>',
|
|
});
|