Use Comments to Unit Test Your Code [A How-To Guide]

Written by kiwicopple | Published 2020/03/01
Tech Story Tags: javascript | testing | unit-testing | documentation | nodejs | unit-test-for-code | comments-in-programming | intro-to-jsdoc

TLDR Use Comments to Unit Test Your Code [A How-To Guide] At Supabase we love writing as little code as possible. We decided to combine our unit tests with the same JSDoc comments that power VSCode's IntelliSense. Elixir has the additional benefit that you can use these comments to run your tests: @supabase/doctest-js. You can see it in action over at our postgrest-js library: The library uses a similar format to Elixir's Doctests.via the TL;DR App

no story

Published by HackerNoon on 2020/03/01