Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7ebcdee

Browse filesBrowse files
committed
Add test
1 parent f5b1e48 commit 7ebcdee
Copy full SHA for 7ebcdee

File tree

Expand file treeCollapse file tree

1 file changed

+11
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+11
-0
lines changed

‎test/no-generic-link-text.test.js

Copy file name to clipboardExpand all lines: test/no-generic-link-text.test.js
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ describe("GH002: No Generic Link Text", () => {
4949
}
5050
});
5151

52+
test("error message", async () => {
53+
const strings = ["[Click here](www.github.com)"];
54+
55+
const results = await runTest(strings, noGenericLinkTextRule);
56+
57+
expect(results[0].ruleDescription).toMatch(
58+
/Avoid using generic link text like `Learn more` or `Click here`/
59+
);
60+
expect(results[0].errorDetail).toBe("For link: Click here");
61+
});
62+
5263
test("additional words can be configured", async () => {
5364
const results = await runTest(
5465
["[something](www.github.com)"],

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.