From b5aa55d96a9d3f854fa82712bacf1e77bfc79704 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Mon, 14 Mar 2022 23:12:14 -0400 Subject: [PATCH] Improve CONTRIBUTING.md (#1678) * Update CONTRIBUTING.md * fix --- CONTRIBUTING.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2131146ce..646916992 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,6 +23,15 @@ compiled code in `dist`. Test cases are declared in `src/test/*.spec.ts`, and test fixtures live in `./tests`. They can be run with `npm run test-local`. +To run a subset of tests: + +``` +# Use ava's --match flag to match the name of a test or suite +# https://github.com/avajs/ava/blob/main/docs/05-command-line.md +# Don't forget the * wildcards +npm run test-local -- --match '*esm loader*' +``` + Tests are run with AVA, but using a custom wrapper API to enable some TS-friendly features and grouped test suites. The tests `npm pack` ts-node into a tarball and `npm install` it into `./tests/node_modules`. This makes `./tests` a better testing environment