Skip to content

Migrate from Vitest to Node.js Test Runner #1749

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Mar 26, 2025
Merged

Migrate from Vitest to Node.js Test Runner #1749

merged 12 commits into from
Mar 26, 2025

Conversation

progfay
Copy link
Owner

@progfay progfay commented Aug 7, 2024

Proposed Changes

npm test

> @progfay/[email protected] test
> node --experimental-default-config-file --test --experimental-test-coverage

▶ Code Block
  ✔ Simple code block (2.319709ms)
  ✔ Bulleted code block (0.170458ms)
  ✔ Code block with bullet (1.505625ms)
  ✔ Consecutive code blocks (0.152ms)
✔ Code Block (4.866916ms)
▶ blank
  ✔ Simple half-space blank (11.772916ms)
  ✔ Simple double-byte space blank (0.291917ms)
  ✔ Simple tab blank (10.1125ms)
  ✔ Multi char blank (0.205958ms)
  ✔ Blank in the sentence (1.302458ms)
  ✔ [] is not blank (0.088459ms)
  ✔ Blank in the [*** ] (0.094667ms)
✔ blank (24.643291ms)
▶ bullet
  ✔ Single-byte space indent (3.697292ms)
  ✔ Double-byte space indent (0.9415ms)
  ✔ Tab indent (0.622458ms)
  ✔ Multi lines bullet (0.134042ms)
✔ bullet (6.172666ms)
▶ code
  ✔ Simple code with backquote (6.537083ms)
  ✔ Empty code with backquote (0.252458ms)
✔ code (7.53575ms)
▶ commandLine
  ✔ Simple command with $ (14.937375ms)
  ✔ Simple command with % (0.807459ms)
  ✔ `$` is not command (1.832167ms)
  ✔ `$ ` is not command (7.320166ms)
  ✔ `$s` is not command (0.156167ms)
✔ commandLine (26.385542ms)
▶ decoration
  ✔ Simple decoration (12.885125ms)
  ✔ All decoration (12.603875ms)
  ✔ Decoration * overflow (0.154791ms)
  ✔ Decoration similar with externalLink (0.284834ms)
  ✔ Decoration with hashTag (0.121666ms)
  ✔ Decoration with many [ (0.080459ms)
  ✔ Decoration with many [ and link (0.145958ms)
  ✔ Decoration with strong notation (it's just link) (0.347916ms)
  ✔ Decoration with icon notation (0.269666ms)
  ✔ Decoration with strong icon notation (it's just icon, not strong) (0.9705ms)
  ✔ Decoration with strong image notation (it's just image, not strong) (0.440083ms)
✔ decoration (29.287292ms)
▶ formula
  ✔ Simple formula (7.735125ms)
  ✔ Formula includes [] with tail half-space (0.290041ms)
  ✔ Formula includes [] without tail half-space (0.678708ms)
✔ formula (9.512167ms)
▶ googleMap
  ✔ Simple google map with NE (4.884541ms)
  ✔ Simple google map with SW (0.710917ms)
  ✔ Simple google map with zoom (0.110292ms)
  ✔ Simple google map with place on left (0.789791ms)
  ✔ Simple google map with place on right (0.126833ms)
✔ googleMap (7.528292ms)
▶ hashTag
  ✔ Simple hashTag (2.602667ms)
  ✔ Only `#` is not hashTag (0.799167ms)
  ✔ HashTag includes `#` (0.163625ms)
  ✔ HashTag in sentence with spaces (0.121667ms)
  ✔ HashTag in sentence without spaces is not hashTag (0.8005ms)
  ✔ Multiple hashTag (0.120125ms)
✔ hashTag (5.351083ms)
▶ helpfeel
  ✔ Simple helpfeel (3.654875ms)
  ✔ No head `?` is not helpfeel (0.8365ms)
  ✔ Quoted ? is not helpfeel (0.641333ms)
✔ helpfeel (6.462625ms)
▶ icon
  ✔ Simple root icon (2.576958ms)
  ✔ Simple relative icon (0.693583ms)
  ✔ Multiple icons (0.107583ms)
  ✔ Icon and internal link on same line (0.28825ms)
  ✔ Each multiple icon must be different Object (0.521084ms)
✔ icon (5.212417ms)
▶ image
  ✔ Simple image (3.436167ms)
  ✔ HTTP jpeg image with special and japanese chars (0.58175ms)
  ✔ HTTPS svg, GIF and WebP image with link (0.267416ms)
  ✔ Image with double image link (0.078875ms)
  ✔ Gyazo image (0.409083ms)
  ✔ Gyazo image with link (0.215125ms)
  ✔ Image with GET parameters (0.066417ms)
  ✔ Direct Gyazo image (0.178542ms)
✔ image (8.44975ms)
▶ line
  ✔ Line that have multi node (3.279417ms)
  ✔ Decoration line includes internal link (0.271416ms)
  ✔ Decoration line includes external link (0.170417ms)
  ✔ Multi `]` (0.220917ms)
✔ line (4.689542ms)
▶ link
  ✔ Simple absolute link (4.653167ms)
  ✔ Simple absolute link with ahead non-space character (0.906375ms)
  ✔ Simple absolute link with bracket (0.099708ms)
  ✔ Simple root link (0.362125ms)
  ✔ Simple relative link (0.130917ms)
  ✔ Link with content (0.240167ms)
  ✔ Root and relative link path can include space (0.595708ms)
  ✔ Link with link (0.370792ms)
  ✔ Link with GET parameters (0.326709ms)
✔ link (8.775041ms)
▶ numberList
  ✔ Minimum numberList (2.218375ms)
  ✔ Simple numberList (0.920166ms)
  ✔ 1. with decoration (1.848125ms)
  ✔ 1. with code (0.499167ms)
  ✔ 1. with no space is not numberList (0.623583ms)
  ✔ No head 1. is not numberList (0.330625ms)
  ✔ Quoted 1. is not numberList (0.258167ms)
✔ numberList (7.576625ms)
▶ plain
  ✔ Simple plain text (2.682583ms)
  ✔ Blank line (0.176292ms)
  ✔ Keep tail space (0.897167ms)
✔ plain (4.537917ms)
▶ quote
  ✔ Simple quote (2.429166ms)
  ✔ Empty quote (0.218084ms)
✔ quote (3.309625ms)
▶ strong
  ✔ Simple strong (3.00275ms)
  ✔ [[]] is not strong (0.864458ms)
  ✔ Decoration in Strong notation (0.263459ms)
✔ strong (4.927334ms)
▶ strongIcon
  ✔ Simple root strong icon (5.436917ms)
  ✔ Simple relative strong icon (0.452666ms)
  ✔ Multiple icons (0.089292ms)
  ✔ Strong icon and internal link on same line (1.040166ms)
  ✔ Each multiple strong icon must be different Object (2.079875ms)
✔ strongIcon (10.33325ms)
▶ strongImage
  ✔ Simple strong image (2.620709ms)
  ✔ HTTP jpeg strong image with special and japanese chars (0.430334ms)
  ✔ Gyazo image (0.135959ms)
  ✔ Direct Gyazo image (0.090833ms)
✔ strongImage (4.070875ms)
▶ page
  ✔ Empty page (2.323917ms)
  ✔ Title Block without `hasTitle` option (0.146417ms)
  ✔ https://scrapbox.io/help/Syntax (8.82025ms)
✔ page (12.272583ms)
▶ Table
  ✔ Simple table (4.146208ms)
  ✔ Bulleted table (0.364833ms)
  ✔ Table with empty cells (0.875833ms)
  ✔ Staggered table (0.215ms)
  ✔ Consecutive table (0.254917ms)
  ✔ Node in table cells (0.704583ms)
✔ Table (7.326708ms)
▶ title
  ✔ Get title from simple page (1.626791ms)
  ✔ Get title from empty page (0.218ms)
  ✔ Get title from title only page (0.060583ms)
  ✔ Get title from huge page (644.531666ms)
✔ title (648.59825ms)
ℹ tests 113
ℹ suites 23
ℹ pass 113
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 1518.047417
ℹ start of coverage report
ℹ -------------------------------------------------------------------------
ℹ file                     | line % | branch % | funcs % | uncovered lines
ℹ -------------------------------------------------------------------------
ℹ src                      |        |          |         |
ℹ  block                   |        |          |         |
ℹ   CodeBlock.ts           | 100.00 |    75.00 |  100.00 |
ℹ   index.ts               | 100.00 |   100.00 |  100.00 |
ℹ   Line.ts                | 100.00 |   100.00 |  100.00 |
ℹ   node                   |        |          |         |
ℹ    BlankNode.ts          | 100.00 |   100.00 |  100.00 |
ℹ    CodeNode.ts           | 100.00 |   100.00 |  100.00 |
ℹ    CommandLineNode.ts    | 100.00 |    66.67 |  100.00 |
ℹ    creator.ts            | 100.00 |    81.25 |  100.00 |
ℹ    DecorationNode.ts     | 100.00 |   100.00 |  100.00 |
ℹ    ExternalLinkNode.ts   | 100.00 |    90.00 |  100.00 |
ℹ    FormulaNode.ts        | 100.00 |   100.00 |  100.00 |
ℹ    GoogleMapNode.ts      | 100.00 |    91.67 |  100.00 |
ℹ    HashTagNode.ts        | 100.00 |   100.00 |  100.00 |
ℹ    HelpfeelNode.ts       | 100.00 |   100.00 |  100.00 |
ℹ    IconNode.ts           | 100.00 |   100.00 |  100.00 |
ℹ    ImageNode.ts          | 100.00 |   100.00 |  100.00 |
ℹ    index.ts              | 100.00 |    90.00 |  100.00 |
ℹ    InternalLinkNode.ts   | 100.00 |   100.00 |  100.00 |
ℹ    NumberListNode.ts     |  95.00 |    66.67 |  100.00 | 15-16
ℹ    PlainNode.ts          | 100.00 |   100.00 |  100.00 |
ℹ    QuoteNode.ts          | 100.00 |   100.00 |  100.00 |
ℹ    StrongIconNode.ts     | 100.00 |   100.00 |  100.00 |
ℹ    StrongImageNode.ts    | 100.00 |   100.00 |  100.00 |
ℹ    StrongNode.ts         | 100.00 |   100.00 |  100.00 |
ℹ   Pack.ts                | 100.00 |    86.67 |  100.00 |
ℹ   Row.ts                 | 100.00 |   100.00 |  100.00 |
ℹ   Table.ts               | 100.00 |    83.33 |  100.00 |
ℹ   Title.ts               | 100.00 |   100.00 |  100.00 |
ℹ  index.ts                | 100.00 |   100.00 |  100.00 |
ℹ  parse.ts                | 100.00 |   100.00 |  100.00 |
ℹ -------------------------------------------------------------------------
ℹ all files                |  99.82 |    92.45 |  100.00 |
ℹ -------------------------------------------------------------------------
ℹ end of coverage report

@progfay progfay marked this pull request as ready for review March 26, 2025 06:22
@progfay progfay merged commit d92b176 into master Mar 26, 2025
1 check passed
@progfay progfay deleted the node-test-runner branch March 26, 2025 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant