-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EW-793 Extend test factories to reduce code duplications
- Loading branch information
1 parent
1ff4491
commit eedfeec
Showing
5 changed files
with
35 additions
and
46 deletions.
There are no files selected for viewing
15 changes: 3 additions & 12 deletions
15
...r/src/modules/common-cartridge/export/builders/common-cartridge-organization-node.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
apps/server/src/modules/common-cartridge/testing/common-cartridge-node-props.factory.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { faker } from '@faker-js/faker'; | ||
import { CommonCartridgeOrganizationNodeProps } from '../export/builders/common-cartridge-organization-node'; | ||
import { CommonCartridgeElementType, CommonCartridgeVersion } from '../export/common-cartridge.enums'; | ||
|
||
export function createCommonCartridgeOrganizationNodeProps(): CommonCartridgeOrganizationNodeProps { | ||
return { | ||
type: CommonCartridgeElementType.ORGANIZATION, | ||
identifier: faker.string.uuid(), | ||
title: faker.lorem.words(), | ||
version: CommonCartridgeVersion.V_1_1_0, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters