Skip to content

Commit 642b8ae

Browse files
authored
Merge pull request #1756 from skaut/dependabot/npm_and_yarn/vitest/eslint-plugin-1.6.12
Bump @vitest/eslint-plugin from 1.6.9 to 1.6.12
2 parents 6d251b0 + c44574e commit 642b8ae

6 files changed

Lines changed: 44 additions & 56 deletions

File tree

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"@eslint/markdown": "^7.5.1",
5656
"@types/node": "^25.5.0",
5757
"@vitest/coverage-v8": "^4.0.18",
58-
"@vitest/eslint-plugin": "^1.6.9",
58+
"@vitest/eslint-plugin": "^1.6.12",
5959
"eslint": "^10.0.3",
6060
"eslint-config-prettier": "^10.1.8",
6161
"eslint-plugin-package-json": "^0.91.0",

tests/issue-management.test.ts

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ describe("[env variable mock]", () => {
5454

5555
test("getIssue fails gracefully on connection issues", async () => {
5656
expect.assertions(1);
57-
await expect(getIssue()).rejects.toThrowError(IssueListError);
57+
await expect(getIssue()).rejects.toThrow(IssueListError);
5858
});
5959

6060
test("getIssue fails gracefully on nonexistent repo", async () => {
@@ -65,7 +65,7 @@ describe("[env variable mock]", () => {
6565
.query({ creator: "github-actions[bot]", labels: "wpvc" })
6666
.reply(404);
6767

68-
await expect(getIssue()).rejects.toThrowError(IssueListError);
68+
await expect(getIssue()).rejects.toThrow(IssueListError);
6969
});
7070

7171
test("commentOnIssue works correctly", async () => {
@@ -85,7 +85,7 @@ describe("[env variable mock]", () => {
8585

8686
test("commentOnIssue fails gracefully on connection issues", async () => {
8787
expect.assertions(1);
88-
await expect(commentOnIssue(123, "ISSUE_BODY")).rejects.toThrowError(
88+
await expect(commentOnIssue(123, "ISSUE_BODY")).rejects.toThrow(
8989
IssueCommentError,
9090
);
9191
});
@@ -101,7 +101,7 @@ describe("[env variable mock]", () => {
101101
})
102102
.reply(404);
103103

104-
await expect(commentOnIssue(123, issueBody)).rejects.toThrowError(
104+
await expect(commentOnIssue(123, issueBody)).rejects.toThrow(
105105
IssueCommentError,
106106
);
107107
expect(scope.isDone()).toBe(true);
@@ -122,7 +122,7 @@ describe("[env variable mock]", () => {
122122

123123
test("closeIssue fails gracefully on connection issues", async () => {
124124
expect.assertions(1);
125-
await expect(closeIssue(123)).rejects.toThrowError(IssueUpdateError);
125+
await expect(closeIssue(123)).rejects.toThrow(IssueUpdateError);
126126
});
127127

128128
test("closeIssue fails gracefully on nonexistent repo", async () => {
@@ -134,7 +134,7 @@ describe("[env variable mock]", () => {
134134
})
135135
.reply(404);
136136

137-
await expect(closeIssue(123)).rejects.toThrowError(IssueUpdateError);
137+
await expect(closeIssue(123)).rejects.toThrow(IssueUpdateError);
138138
expect(scope.isDone()).toBe(true);
139139
});
140140

@@ -181,19 +181,19 @@ describe("[env variable mock]", () => {
181181
test("createIssue fails gracefully on connection issues", async () => {
182182
expect.assertions(1);
183183

184-
await expect(
185-
createIssue("ISSUE_TITLE", "ISSUE_BODY", []),
186-
).rejects.toThrowError(IssueCreationError);
184+
await expect(createIssue("ISSUE_TITLE", "ISSUE_BODY", [])).rejects.toThrow(
185+
IssueCreationError,
186+
);
187187
});
188188

189189
test("createIssue fails gracefully on nonexistent repo", async () => {
190190
expect.assertions(1);
191191

192192
nock("https://api.github.com").post("/repos/OWNER/REPO/issues").reply(404);
193193

194-
await expect(
195-
createIssue("ISSUE_TITLE", "ISSUE_BODY", []),
196-
).rejects.toThrowError(IssueCreationError);
194+
await expect(createIssue("ISSUE_TITLE", "ISSUE_BODY", [])).rejects.toThrow(
195+
IssueCreationError,
196+
);
197197
});
198198

199199
test("updateIssue works correctly with an up-to-date-issue", async () => {
@@ -254,9 +254,7 @@ describe("[env variable mock]", () => {
254254
.patch("/repos/OWNER/REPO/issues/123", { body, title })
255255
.reply(200);
256256

257-
await expect(updateIssue(123, title, body)).rejects.toThrowError(
258-
GetIssueError,
259-
);
257+
await expect(updateIssue(123, title, body)).rejects.toThrow(GetIssueError);
260258
});
261259

262260
test("updateIssue fails gracefully on connection issues on updating the existing issue", async () => {
@@ -269,7 +267,7 @@ describe("[env variable mock]", () => {
269267
.get("/repos/OWNER/REPO/issues/123")
270268
.reply(200, { body, title: "WRONG_TITLE" });
271269

272-
await expect(updateIssue(123, title, body)).rejects.toThrowError(
270+
await expect(updateIssue(123, title, body)).rejects.toThrow(
273271
IssueUpdateError,
274272
);
275273
expect(scope.isDone()).toBe(true);
@@ -284,8 +282,8 @@ describe("[env variable mock]", () => {
284282
.patch("/repos/OWNER/REPO/issues/123")
285283
.reply(404);
286284

287-
await expect(
288-
updateIssue(123, "ISSUE_TITLE", "ISSUE_BODY"),
289-
).rejects.toThrowError(GetIssueError);
285+
await expect(updateIssue(123, "ISSUE_TITLE", "ISSUE_BODY")).rejects.toThrow(
286+
GetIssueError,
287+
);
290288
});
291289
});

tests/tested-version.test.ts

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ describe("[env variable mock]", () => {
6363
readme: ["path/to/readme.txt"],
6464
};
6565

66-
await expect(testedVersion(config)).rejects.toThrowError(
67-
InvalidReadmeError,
68-
);
66+
await expect(testedVersion(config)).rejects.toThrow(InvalidReadmeError);
6967
});
7068

7169
test("testedVersion fails gracefully on no readme", async () => {
@@ -82,9 +80,7 @@ describe("[env variable mock]", () => {
8280
.get(`/repos/OWNER/REPO/contents/${encodeURIComponent(readmePath)}`)
8381
.reply(404);
8482

85-
await expect(testedVersion(config)).rejects.toThrowError(
86-
InvalidReadmeError,
87-
);
83+
await expect(testedVersion(config)).rejects.toThrow(InvalidReadmeError);
8884
});
8985

9086
test("testedVersion fails gracefully on invalid response", async () => {
@@ -101,9 +97,7 @@ describe("[env variable mock]", () => {
10197
.get(`/repos/OWNER/REPO/contents/${encodeURIComponent(readmePath)}`)
10298
.reply(200);
10399

104-
await expect(testedVersion(config)).rejects.toThrowError(
105-
InvalidReadmeError,
106-
);
100+
await expect(testedVersion(config)).rejects.toThrow(InvalidReadmeError);
107101
});
108102

109103
test("testedVersion fails gracefully on invalid response 2", async () => {
@@ -122,9 +116,7 @@ describe("[env variable mock]", () => {
122116
content: "OOPS",
123117
});
124118

125-
await expect(testedVersion(config)).rejects.toThrowError(
126-
InvalidReadmeError,
127-
);
119+
await expect(testedVersion(config)).rejects.toThrow(InvalidReadmeError);
128120
});
129121

130122
test.each([
@@ -150,9 +142,7 @@ describe("[env variable mock]", () => {
150142
content: Buffer.from(readme).toString("base64"),
151143
});
152144

153-
await expect(testedVersion(config)).rejects.toThrowError(
154-
InvalidReadmeError,
155-
);
145+
await expect(testedVersion(config)).rejects.toThrow(InvalidReadmeError);
156146
});
157147

158148
test("testedVersion works correctly with one invalid and one valid readme", async () => {

tests/wordpress-versions.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ test("wordpressVersions works correctly when stable, RC, and beta versions are a
5151

5252
test("wordpressVersions fails gracefully on connection issues", async () => {
5353
expect.assertions(1);
54-
await expect(wordpressVersions()).rejects.toThrowError(LatestVersionError);
54+
await expect(wordpressVersions()).rejects.toThrow(LatestVersionError);
5555
});
5656

5757
test("wordpressVersions fails gracefully on connection issues 2", async () => {
@@ -61,7 +61,7 @@ test("wordpressVersions fails gracefully on connection issues 2", async () => {
6161
.get("/core/version-check/1.7/?channel=beta")
6262
.reply(404);
6363

64-
await expect(wordpressVersions()).rejects.toThrowError(LatestVersionError);
64+
await expect(wordpressVersions()).rejects.toThrow(LatestVersionError);
6565
});
6666

6767
test("wordpressVersions fails gracefully on invalid response", async () => {
@@ -71,7 +71,7 @@ test("wordpressVersions fails gracefully on invalid response", async () => {
7171
.get("/core/version-check/1.7/?channel=beta")
7272
.reply(200);
7373

74-
await expect(wordpressVersions()).rejects.toThrowError(LatestVersionError);
74+
await expect(wordpressVersions()).rejects.toThrow(LatestVersionError);
7575
});
7676

7777
test("wordpressVersions fails gracefully on invalid response 2", async () => {
@@ -83,7 +83,7 @@ test("wordpressVersions fails gracefully on invalid response 2", async () => {
8383
translations: [],
8484
});
8585

86-
await expect(wordpressVersions()).rejects.toThrowError(LatestVersionError);
86+
await expect(wordpressVersions()).rejects.toThrow(LatestVersionError);
8787
});
8888

8989
test("wordpressVersions fails gracefully on invalid response 3", async () => {
@@ -96,7 +96,7 @@ test("wordpressVersions fails gracefully on invalid response 3", async () => {
9696
translations: [],
9797
});
9898

99-
await expect(wordpressVersions()).rejects.toThrowError(LatestVersionError);
99+
await expect(wordpressVersions()).rejects.toThrow(LatestVersionError);
100100
});
101101

102102
test("wordpressVersions fails gracefully on invalid response 4", async () => {
@@ -113,7 +113,7 @@ test("wordpressVersions fails gracefully on invalid response 4", async () => {
113113
translations: [],
114114
});
115115

116-
await expect(wordpressVersions()).rejects.toThrowError(LatestVersionError);
116+
await expect(wordpressVersions()).rejects.toThrow(LatestVersionError);
117117
});
118118

119119
test("wordpressVersions fails gracefully on invalid response 5", async () => {
@@ -130,5 +130,5 @@ test("wordpressVersions fails gracefully on invalid response 5", async () => {
130130
translations: [],
131131
});
132132

133-
await expect(wordpressVersions()).rejects.toThrowError(LatestVersionError);
133+
await expect(wordpressVersions()).rejects.toThrow(LatestVersionError);
134134
});

tests/wpvc-config.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ describe("Mocked env variables", () => {
8484

8585
test("getWPVCConfig fails gracefully on connection issues", async () => {
8686
expect.assertions(1);
87-
await expect(getWPVCConfig()).rejects.toThrowError(ConfigError);
87+
await expect(getWPVCConfig()).rejects.toThrow(ConfigError);
8888
});
8989

9090
test("getWPVCConfig returns defaults on no config", async () => {
@@ -115,7 +115,7 @@ describe("Mocked env variables", () => {
115115
.get("/repos/OWNER/REPO/contents/.wordpress-version-checker.json")
116116
.reply(200);
117117

118-
await expect(getWPVCConfig()).rejects.toThrowError(ConfigError);
118+
await expect(getWPVCConfig()).rejects.toThrow(ConfigError);
119119
});
120120

121121
test("getWPVCConfig fails gracefully on invalid response 2", async () => {
@@ -127,7 +127,7 @@ describe("Mocked env variables", () => {
127127
content: "OOPS",
128128
});
129129

130-
await expect(getWPVCConfig()).rejects.toThrowError(ConfigError);
130+
await expect(getWPVCConfig()).rejects.toThrow(ConfigError);
131131
});
132132

133133
test("getWPVCConfig fails gracefully on invalid config", async () => {
@@ -139,7 +139,7 @@ describe("Mocked env variables", () => {
139139
content: Buffer.from(JSON.stringify(false)).toString("base64"),
140140
});
141141

142-
await expect(getWPVCConfig()).rejects.toThrowError(ConfigError);
142+
await expect(getWPVCConfig()).rejects.toThrow(ConfigError);
143143
});
144144

145145
test("getWPVCConfig fails gracefully on invalid config 2", async () => {
@@ -155,7 +155,7 @@ describe("Mocked env variables", () => {
155155
content: Buffer.from(JSON.stringify(config)).toString("base64"),
156156
});
157157

158-
await expect(getWPVCConfig()).rejects.toThrowError(ConfigError);
158+
await expect(getWPVCConfig()).rejects.toThrow(ConfigError);
159159
});
160160

161161
test("getWPVCConfig fails gracefully on invalid config 3", async () => {
@@ -171,7 +171,7 @@ describe("Mocked env variables", () => {
171171
content: Buffer.from(JSON.stringify(config)).toString("base64"),
172172
});
173173

174-
await expect(getWPVCConfig()).rejects.toThrowError(ConfigError);
174+
await expect(getWPVCConfig()).rejects.toThrow(ConfigError);
175175
});
176176

177177
test("getWPVCConfig fails gracefully on invalid config 4", async () => {
@@ -187,7 +187,7 @@ describe("Mocked env variables", () => {
187187
content: Buffer.from(JSON.stringify(config)).toString("base64"),
188188
});
189189

190-
await expect(getWPVCConfig()).rejects.toThrowError(ConfigError);
190+
await expect(getWPVCConfig()).rejects.toThrow(ConfigError);
191191
});
192192

193193
test("getWPVCConfig fails gracefully on invalid config 5", async () => {
@@ -203,7 +203,7 @@ describe("Mocked env variables", () => {
203203
content: Buffer.from(JSON.stringify(config)).toString("base64"),
204204
});
205205

206-
await expect(getWPVCConfig()).rejects.toThrowError(ConfigError);
206+
await expect(getWPVCConfig()).rejects.toThrow(ConfigError);
207207
});
208208

209209
test("getWPVCConfig fails gracefully on invalid config 6", async () => {
@@ -219,7 +219,7 @@ describe("Mocked env variables", () => {
219219
content: Buffer.from(JSON.stringify(config)).toString("base64"),
220220
});
221221

222-
await expect(getWPVCConfig()).rejects.toThrowError(ConfigError);
222+
await expect(getWPVCConfig()).rejects.toThrow(ConfigError);
223223
});
224224

225225
test("getWPVCConfig fails gracefully on invalid config 7", async () => {
@@ -235,6 +235,6 @@ describe("Mocked env variables", () => {
235235
content: Buffer.from(JSON.stringify(config)).toString("base64"),
236236
});
237237

238-
await expect(getWPVCConfig()).rejects.toThrowError(ConfigError);
238+
await expect(getWPVCConfig()).rejects.toThrow(ConfigError);
239239
});
240240
});

0 commit comments

Comments
 (0)