Testing with Deno

preview_player
Показать описание
In this video, we explore Deno's built-in test runner. We'll write a simple test, run it with VSCode, measure our test coverage, and output test reports in various formats.

00:00 Intro
00:17 Testing with Deno Standard Library `assert`
00:48 Run tests with VSCode
01:06 Re-run tests with `deno test --watch`
01:20 Measuring test coverage with `deno test --coverage`
01:28 Type checking commented code with `deno test --doc`
01:53 Changing your test reporter format

Read more about testing with Deno

Deno is an all-in-one batteries included JavaScript and TypeScript toolchain.

Рекомендации по теме
Комментарии
Автор

Could you please enhance the integration to include support for BDD-style tests (using `describe`/`it` syntax) within VS Code's native Testing Panel?

Currently, test suites written in BDD format are not displayed in the VS Code Test Explorer UI, despite being structured with `describe` blocks. It appears the Deno Language Server Protocol (LSP) may not be detecting or forwarding these BDD tests to the IDE.

abhiparate
Автор

Is there anything about testing that you want us to cover or dive deeper on? Let us know in the comments.

deno_land
Автор

What of FE libs/frameworks or browser testing? Is there a deno way to clear the jsdom chasm?

seannewell
Автор

I guess it's more check than test but is there a way to find missing type declarations? Like sometimes I forget to declare return types. It's very tedious to go over every function manually.

MOtherMetroid
Автор

How about a conversational style video going through an @std lib and its tests?

* real code, but self contained and general enough for most to get value out of.
* shows some good test practice (or at least it better be!)
* good opportunity to say why things are like they are.

“Hello world” testing resources are a dime a dozen and not particularly helpful. Some real world examples with context would be much appreciated.

SlackoJacko
Автор

Good to see Jsdoc support. But, Jsdoc lack is ability to extract types to separate. Chunks of Comments over every function looks pretty verbose to me. It would nice to have import or something which works with a structure as below.
├── src/
│ └── utils.js
└── docs/
└── utils.jsdoc

ashrafal