Skip to content

Commit

Permalink
test(Position): 🤡 generateOneMockPosition()
Browse files Browse the repository at this point in the history
  • Loading branch information
juamber-rgs committed Feb 1, 2024
1 parent e3a3415 commit 66b73f9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"SSR",
"GitHubActions",
"VSCode",
"Layout"
"Layout",
"Position"
],
"cSpell.words": [
"cascadeselect",
Expand Down
17 changes: 17 additions & 0 deletions src/app/backoffice/tables/position/models/position.mock.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { faker } from '@faker-js/faker';
import { generateMockTranslations } from 'src/app/shared/models/translation.mock';
import { generateOneMockCompany } from '../../company/models/company.mock';
import { Position } from './position.model';

export const generateOneMockPosition = (): Position => ({
id: faker.string.uuid(),
nameTranslations: generateMockTranslations(),
descriptionTranslations: generateMockTranslations(),
dateFrom: faker.date.past(),
dateTo: faker.date.past(),
hourlyWage: faker.number.int({ min: 1, max: 100 }),
importance: faker.number.int({ min: 1, max: 5 }),
company: generateOneMockCompany(),
createdAt: faker.date.past(),
updatedAt: new Date(),
});

0 comments on commit 66b73f9

Please sign in to comment.