Skip to content
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

feat: add new entry #41

Merged
merged 2 commits into from
Jul 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions posts/2023/07/23/node-test-runner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
date: '2023-07-23'
title: Try `node:test` with TypeScript
snippet: node:test を動かしたかった
---

## TL;DR 🚶‍♂️🚶‍♂️🚶‍♂️

- Output: <https://github.com/g59/bot/pull/1037>
- Must be used with a loader to use TypeScript
- <https://github.com/nodejs/help/issues/3902#issuecomment-1217235905>
- The `assert` syntax can be used
- <https://nodejs.org/api/assert.html>
- <https://nodejs.org/api/test.html>
- I still don't use it at work

## Good

- Type information is maintained 👌
- `describe`, `it` can be used 👌

## Not Sure

- Asynchronous process not terminated 😶‍🌫️
- API is different on `node18` `node20`
<https://github.com/kachick/times_kachick/issues/192>

## Visual

- Very simple
- <https://nodejs.org/api/assert.html#assertvalue-message>
- Not particularly excellent

## 感想

- TypeScriptを使って小さなものを作りたい時に、nodejsを使うほど小さく便利なものではなかった
- もうしばらく様子を伺う