Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0b31089

Browse files
committed
docs(contr): add section on testing
1 parent 83701f9 commit 0b31089

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

‎docs/CONTRIBUTING.md‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
22
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
3+
34
# Contributing
45

56
- [Pull Requests](#pull-requests)
@@ -112,6 +113,37 @@ In our GitHub Actions CI, we use CentOS 7 for maximum compatibility.
112113
If you need your builds to support older distros, run the build commands
113114
inside a Docker container with all the build requirements installed.
114115

116+
## Testing
117+
118+
There are three kinds of tests in code-server:
119+
120+
1. unit tests
121+
2. integration tests
122+
3. end-to-end tests
123+
124+
### Unit Tests
125+
126+
Our unit tests are written in TypeScript and run using [Jest](https://jestjs.io/).
127+
128+
These live under [test/unit](../test/unit).
129+
130+
### Integration Tests
131+
132+
These are a work-in-progress. We build code-server a run a script called [test-standalone-release.sh`](../ci/build/test-standalone-release.sh)
133+
which ensures that code-server's CLI is working.
134+
135+
### End-to-End Tests
136+
137+
The end-to-end (e2e) are written in TypeScript and run using [Playwright](https://playwright.dev/).
138+
139+
These live under [test/e2e](../test/e2e).
140+
141+
Before the e2e tests run, we have a `globalSetup` that runs which makes it so you don't have to login before each test and can reuse the authentication state.
142+
143+
Take a look at `codeServer.test.ts` to see how you use it (look at `test.use`).
144+
145+
We also have a model where you can create helpers to use within tests. Take a look at [models/CodeServer.ts](../test/e2e/models/CodeServer.ts) to see an example.
146+
115147
## Structure
116148

117149
The `code-server` script serves an HTTP API for login and starting a remote VS Code process.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /