https://github.com/guiltydolphin/dentest
Testing framework for Deno
https://github.com/guiltydolphin/dentest
Last synced: over 1 year ago
JSON representation
Testing framework for Deno
- Host: GitHub
- URL: https://github.com/guiltydolphin/dentest
- Owner: GuiltyDolphin
- License: gpl-3.0
- Created: 2021-05-24T07:59:32.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-30T18:58:55.000Z (almost 5 years ago)
- Last Synced: 2025-01-13T16:18:09.675Z (over 1 year ago)
- Language: TypeScript
- Size: 33.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- Changelog: CHANGELOG.org
- License: LICENSE
Awesome Lists containing this project
README
#+TITLE: Dentest
Testing framework for Deno.
* Usage
Dentest provides support for grouping tests using
=testGroup=. Only top-level tests need to be run using the
=runAsMain= method. The following example shows how to group
tests in this manner:
#+BEGIN_SRC typescript
import {
assertEquals,
testGroup,
Test
} from 'https://deno.land/x/dentest/mod.ts'
testGroup('booleans',
new Test('true is true', () => assertEquals(true, true)),
new Test('false is false', () => assertEquals(false, false)),
testGroup('more boolean tests',
new Test('not true is false', () => assertEquals(!true, false)),
new Test('not false is true', () => assertEquals(!false, true)),
),
).runAsMain();
#+END_SRC
* Development
** Coverage
To generate code test coverage, make sure you have access to
the =genhtml= tool (e.g., via the [[https://aur.archlinux.org/packages/lcov/][lcov package on AUR]]), then
run =make coverage= in the top-level of the project.
** Testing
Run =make test= in the top-level of the project to run the
tests. If you need to see results for tests that passed, run
=make test_verbose= or =deno test= instead.