From 8c4576a53ae394955817541e625ec90aa98bb77d Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sun, 10 Mar 2024 21:36:17 +0100 Subject: [PATCH] Improve documentation --- CONTRIBUTING.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 00e7115d7..e81273142 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,11 +5,11 @@ You can run all tests using `npm run all-test`. However, you will very likely only ever need `npm run api-test` and `npm run ui-test`. -API tests check the generated code and are located in `tests/test-js/api.js`. +API tests check the generated code and are located in `tools/api.js`. UI tests check the output of a given `.goml` script. They are used to check whether or not a command is failing and eventually to check what it prints on the console. They are located in -`tests/ui-tests`. +`tests/ui`. The other tests are checks for the framework's code itself: * To check that there is no documentation missing for a command, there is `npm run doc-test`. @@ -17,6 +17,12 @@ The other tests are checks for the framework's code itself: * To ensure that the `.goml` parser is doing what's expected, there is `npm run parser-test`. * To check that the exported API is doing what's expected, there is `npm run exported-test`. +For `ui` tests, you can filter which ones you want to run by passing the test name as argument: + +``` +$ npm run ui-test debug.goml debug2.goml +``` + ## Add, extend or update command If you want to add a new command or extend/update an existing command, you will need to update @@ -29,7 +35,7 @@ Once done, you can generate the `.json` file by using `npm run api-test --bless` generated output files to ensure it is generating the expected code. Don't forget to check each variant of the command! -For UI tests, better to add a new `.goml` file into `tests/ui-tests` if you add a new command. +For UI tests, better to add a new `.goml` file into `tests/ui` if you add a new command. Otherwise, just update an existing one which checks this command in particular. As for what to add in the file: check it fails when it's supposed to and works when it's supposed to. Check all variants as well.