Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/utils/collections/policyTags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import type {PolicyTagLists, PolicyTags} from '@src/types/onyx';
export default function createRandomPolicyTags(tagListName: string, numberOfTags = 0): PolicyTagLists {
const tags: PolicyTags = {};
for (let i = 0; i < numberOfTags; i++) {
const tagName = randWord();
// Prevent the tag name from being duplicated, which can happen when a lot of tests are being ran
// and can cause tests to fail because tag lists must always contain a unique set of tags
const tagName = `${randWord()}${i}`;
tags[tagName] = {
name: tagName,
enabled: true,
Expand Down
Loading