Skip to content

Commit 203db75

Browse files
committed
fix(test): satisfy effect lint for generators
1 parent feffc8b commit 203db75

1 file changed

Lines changed: 5 additions & 40 deletions

File tree

packages/app/tests/docker-git/app-ready-create.test.ts

Lines changed: 5 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -25,48 +25,13 @@ const validGithubStatus: GithubAuthStatus = {
2525
tokens: [{ key: "default", label: "default", login: "octocat", status: "valid" }]
2626
}
2727

28-
const githubNameChars = [
29-
"a",
30-
"b",
31-
"c",
32-
"d",
33-
"e",
34-
"f",
35-
"g",
36-
"h",
37-
"i",
38-
"j",
39-
"k",
40-
"l",
41-
"m",
42-
"n",
43-
"o",
44-
"p",
45-
"q",
46-
"r",
47-
"s",
48-
"t",
49-
"u",
50-
"v",
51-
"w",
52-
"x",
53-
"y",
54-
"z",
55-
"0",
56-
"1",
57-
"2",
58-
"3",
59-
"4",
60-
"5",
61-
"6",
62-
"7",
63-
"8",
64-
"9",
65-
"-"
66-
] as const
28+
const githubNameChars = "abcdefghijklmnopqrstuvwxyz0123456789-"
29+
const githubNameCharArbitrary = fc
30+
.integer({ min: 0, max: githubNameChars.length - 1 })
31+
.map((index) => githubNameChars[index] ?? "a")
6732

6833
const githubSegmentArbitrary = fc
69-
.array(fc.constantFrom(...githubNameChars), { minLength: 1, maxLength: 12 })
34+
.array(githubNameCharArbitrary, { minLength: 1, maxLength: 12 })
7035
.map((chars) => chars.join(""))
7136
.filter((value) => !value.startsWith("-") && !value.endsWith("-"))
7237

0 commit comments

Comments
 (0)