Skip to content

Commit b0c76ca

Browse files
test: rename director to __tests__ and fix vitest config coverage
1 parent 02ba4d5 commit b0c76ca

27 files changed

Lines changed: 49 additions & 136 deletions

β€Ž.github/workflows/test.ymlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
run: npm ci --prefer-offline
2222

2323
- name: Run unit tests
24-
run: npm run test:coverage
24+
run: npm run test:ci
2525

2626
- name: Upload coverage reports to Codecov
2727
uses: codecov/codecov-action@v5

β€Ž.husky/pre-commitβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
npm run test:coverage
1+
npm run build:cjs
2+
npm run test:ci
23
npx lint-staged

β€Ž__tests__/cases/complex.htmlβ€Ž

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>Page Title</title>
6+
<meta description="" />
7+
<link rel="stylesheet" href="style.css" type="text/css" />
8+
<style>
9+
#heading {
10+
color: #f00;
11+
}
12+
</style>
13+
</head>
14+
<body>
15+
<header style="background: black">
16+
<nav>item</nav>
17+
</header>
18+
<h1 id="heading">bar</h1>
19+
<p class="one two" onclick="javascript: void 0;">
20+
baz <em style="display: none">qux</em>
21+
<a href="#">link</a>
22+
</p>
23+
<script src="foo.js"></script>
24+
<script type="text/javascript" data-foo="bar">
25+
// comment
26+
console.log('bar');
27+
</script>
28+
<svg></svg>
29+
<!-- comment -->
30+
baz
31+
</body>
32+
</html>

0 commit comments

Comments
Β (0)