Skip to content

Commit bbffc16

Browse files
committed
Replace faker.random.word by faker.word.sample
1 parent a4f90b7 commit bbffc16

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

extensions/ql-vscode/src/stories/variant-analysis/VariantAnalysisAnalyzedRepos.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ const manyScannedRepos = Array.from({ length: 1000 }, (_, i) => {
142142
id: faker.helpers.unique(faker.number.int, [], {
143143
store: uniqueStore,
144144
}),
145-
fullName: `octodemo/${faker.helpers.unique(faker.random.word, [], {
145+
fullName: `octodemo/${faker.helpers.unique(faker.word.sample, [], {
146146
store: uniqueStore,
147147
})}`,
148148
},

extensions/ql-vscode/test/factories/variant-analysis/gh-api/repository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
RepositoryWithMetadata,
55
} from "../../../../src/variant-analysis/gh-api/repository";
66

7-
export function createMockRepository(name = faker.random.word()): Repository {
7+
export function createMockRepository(name = faker.word.sample()): Repository {
88
return {
99
id: faker.number.int(),
1010
name,

extensions/ql-vscode/test/factories/variant-analysis/gh-api/skipped-repositories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ export function createMockSkippedRepoGroup(): VariantAnalysisSkippedRepositoryGr
2626
}
2727

2828
export function createMockNotFoundSkippedRepoGroup(): VariantAnalysisNotFoundRepositoryGroup {
29-
const repoName1 = `github/${faker.random.word()}`;
30-
const repoName2 = `github/${faker.random.word()}`;
29+
const repoName1 = `github/${faker.word.sample()}`;
30+
const repoName2 = `github/${faker.word.sample()}`;
3131

3232
return {
3333
repository_count: 2,

extensions/ql-vscode/test/factories/variant-analysis/shared/repository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
export function createMockRepository(): Repository {
88
return {
99
id: faker.number.int(),
10-
fullName: `github/${faker.random.word()}`,
10+
fullName: `github/${faker.word.sample()}`,
1111
private: faker.datatype.boolean(),
1212
};
1313
}

extensions/ql-vscode/test/factories/variant-analysis/shared/scanned-repositories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
import { createMockRepositoryWithMetadata } from "./repository";
77

88
export function createMockScannedRepo(
9-
name: string = faker.random.word(),
9+
name: string = faker.word.sample(),
1010
isPrivate: boolean = faker.datatype.boolean(),
1111
analysisStatus: VariantAnalysisRepoStatus = VariantAnalysisRepoStatus.Pending,
1212
): VariantAnalysisScannedRepository {

extensions/ql-vscode/test/factories/variant-analysis/shared/skipped-repositories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ export function createMockNotFoundRepoGroup(): VariantAnalysisSkippedRepositoryG
2929
repositoryCount: 2,
3030
repositories: [
3131
{
32-
fullName: `github/${faker.random.word()}`,
32+
fullName: `github/${faker.word.sample()}`,
3333
},
3434
{
35-
fullName: `github/${faker.random.word()}`,
35+
fullName: `github/${faker.word.sample()}`,
3636
},
3737
],
3838
};

extensions/ql-vscode/test/unit-tests/variant-analysis/variant-analysis-processor.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ describe(processVariantAnalysisRepositoryTask.name, () => {
197197

198198
describe(processScannedRepository.name, () => {
199199
const mockApiResponse = createMockScannedRepo(
200-
faker.random.word(),
200+
faker.word.sample(),
201201
faker.datatype.boolean(),
202202
VariantAnalysisRepoStatus.Pending,
203203
);

0 commit comments

Comments
 (0)