From 4e310b4985367a331538abf1a6428634e6c0f1fc Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Wed, 29 Sep 2021 14:53:25 -0700 Subject: [PATCH] docs(CONTRIBUTING): add scrip tests section --- docs/CONTRIBUTING.md | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 684bc16f..4c3e52e0 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -1,20 +1,23 @@ + # Contributing -- [Requirements](#requirements) -- [Creating pull requests](#creating-pull-requests) - - [Commits and commit history](#commits-and-commit-history) -- [Development workflow](#development-workflow) - - [Updates to VS Code](#updates-to-vs-code) - - [Build](#build) +- [Contributing](#contributing) + - [Requirements](#requirements) + - [Creating pull requests](#creating-pull-requests) + - [Commits and commit history](#commits-and-commit-history) + - [Development workflow](#development-workflow) + - [Updates to VS Code](#updates-to-vs-code) + - [Build](#build) - [Test](#test) - - [Unit tests](#unit-tests) - - [Integration tests](#integration-tests) - - [End-to-end tests](#end-to-end-tests) -- [Structure](#structure) - - [Modifications to VS Code](#modifications-to-vs-code) - - [Currently Known Issues](#currently-known-issues) + - [Unit tests](#unit-tests) + - [Script tests](#script-tests) + - [Integration tests](#integration-tests) + - [End-to-end tests](#end-to-end-tests) + - [Structure](#structure) + - [Modifications to VS Code](#modifications-to-vs-code) + - [Currently Known Issues](#currently-known-issues) @@ -129,13 +132,14 @@ yarn package > If you need your builds to support older distros, run the build commands > inside a Docker container with all the build requirements installed. -### Test +## Test -There are three kinds of tests in code-server: +There are four kinds of tests in code-server: 1. Unit tests -2. Integration tests -3. End-to-end tests +2. Script tests +3. Integration tests +4. End-to-end tests ### Unit tests @@ -146,6 +150,14 @@ These live under [test/unit](../test/unit). We use unit tests for functions and things that can be tested in isolation. The file structure is modeled closely after `/src` so it's easy for people to know where test files should live. +### Script tests + +Our script tests are written in bash and run using [bats](https://github.com/bats-core/bats-core). + +These tests live under `test/scripts`. + +We use these to test anything related to our scripts (most of which live under `ci`). + ### Integration tests These are a work in progress. We build code-server and run a script called