Skip to content

Commit

Permalink
Merge pull request #44 from SaekiTominaga/markuplint/test
Browse files Browse the repository at this point in the history
Separate files for each test case
  • Loading branch information
SaekiTominaga committed May 13, 2024
2 parents 02fb16b + c1bfe3a commit 503d830
Show file tree
Hide file tree
Showing 65 changed files with 804 additions and 485 deletions.
2 changes: 1 addition & 1 deletion packages/markuplint/.markuplintrc
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"label-has-control": true,
"landmark-roles": true,
"neighbor-popovers": true,
"no-consecutive-br": true,
"no-ambiguous-navigable-target-names": true,
"no-consecutive-br": true,
"no-refer-to-non-existent-id": true,
"require-accessible-name": true,
"required-h1": true,
Expand Down
6 changes: 0 additions & 6 deletions packages/markuplint/__tests__/.markuplintrc

This file was deleted.

111 changes: 0 additions & 111 deletions packages/markuplint/__tests__/invalid/nodeRules.html

This file was deleted.

16 changes: 16 additions & 0 deletions packages/markuplint/__tests__/invalid/nodeRules/details.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">
<head>
<title>`details`</title>
</head>
<body>
<h1><code>details</code></h1>

<details name="details-name">
<summary>summary</summary>
<details name="details-name">
<summary>summary</summary>
</details>
</details>
</body>
</html>
11 changes: 11 additions & 0 deletions packages/markuplint/__tests__/invalid/nodeRules/div.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!doctype html>
<html lang="en">
<head>
<title>`div`</title>
</head>
<body>
<h1><code>div</code></h1>

<div>text</div>
</body>
</html>
37 changes: 37 additions & 0 deletions packages/markuplint/__tests__/invalid/nodeRules/figure-table.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!doctype html>
<html lang="en">
<head>
<title>`figure table`</title>
</head>
<body>
<h1><code>figure table</code></h1>

<figure>
<figcaption>text</figcaption>
<table>
<caption>
text
</caption>
<tbody>
<tr>
<td>text</td>
</tr>
</tbody>
</table>
</figure>

<figure>
<table>
<caption>
text
</caption>
<tbody>
<tr>
<td>text</td>
</tr>
</tbody>
</table>
<figcaption>text</figcaption>
</figure>
</body>
</html>
9 changes: 9 additions & 0 deletions packages/markuplint/__tests__/invalid/nodeRules/html.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!doctype html>
<html>
<head>
<title>`html`</title>
</head>
<body>
<h1><code>html</code></h1>
</body>
</html>
11 changes: 11 additions & 0 deletions packages/markuplint/__tests__/invalid/nodeRules/iframe.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!doctype html>
<html lang="en">
<head>
<title>`iframe`</title>
</head>
<body>
<h1><code>iframe</code></h1>

<iframe></iframe>
</body>
</html>
11 changes: 11 additions & 0 deletions packages/markuplint/__tests__/invalid/nodeRules/img.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!doctype html>
<html lang="en">
<head>
<title>`img`</title>
</head>
<body>
<h1><code>img</code></h1>

<img src="" title="alt" />
</body>
</html>
11 changes: 11 additions & 0 deletions packages/markuplint/__tests__/invalid/nodeRules/input.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!doctype html>
<html lang="en">
<head>
<title>`input`</title>
</head>
<body>
<h1><code>input</code></h1>

<input pattern="xxx" />
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<title>`meta[property]`</title>

<meta property="" />
<meta property="og:" />
<meta property="foo:bar" />
</head>
<body>
<h1><code>meta[property]</code></h1>
</body>
</html>
19 changes: 19 additions & 0 deletions packages/markuplint/__tests__/invalid/nodeRules/object.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!doctype html>
<html lang="en">
<head>
<title>`object`</title>
</head>
<body>
<h1><code>object</code></h1>

<object data="object" role="img" aria-labelledby="object-label1">
<div id="object-label1">text</div>
</object>

<object data="object" type="image/png" aria-labelledby="object-label2">
<div id="object-label2">text</div>
</object>

<object data="object" type="image/png" role="img" aria-label="label">text</object>
</body>
</html>
11 changes: 11 additions & 0 deletions packages/markuplint/__tests__/invalid/nodeRules/search.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!doctype html>
<html lang="en">
<head>
<title>`search`</title>
</head>
<body>
<h1><code>search</code></h1>

<search>text</search>
</body>
</html>
29 changes: 29 additions & 0 deletions packages/markuplint/__tests__/invalid/nodeRules/th.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!doctype html>
<html lang="en">
<head>
<title>`th`</title>
</head>
<body>
<h1><code>th</code></h1>

<table>
<caption>
text
</caption>
<thead>
<tr>
<th>text</th>
<th scope="row">text</th>
<th scope="rowgroup">text</th>
</tr>
</thead>
<tbody>
<tr>
<th>text</th>
<th scope="col">text</th>
<th scope="colgroup">text</th>
</tr>
</tbody>
</table>
</body>
</html>
Loading

0 comments on commit 503d830

Please sign in to comment.