MCPcopy Index your code
hub / github.com/coder/code-server / describe

Function describe

test/e2e/baseFixture.ts:11–38  ·  view source on GitHub ↗
(
  name: string,
  codeServerArgs: string[],
  codeServerEnv: NodeJS.ProcessEnv,
  fn: (codeServer: CodeServer) => void,
)

Source from the content-addressed store, hash-verified

9 * If `includeCredentials` is `true` page requests will be authenticated.
10 */
11export const describe = (
12 name: string,
13 codeServerArgs: string[],
14 codeServerEnv: NodeJS.ProcessEnv,
15 fn: (codeServer: CodeServer) => void,
16) => {
17 test.describe(name, () => {
18 // This will spawn on demand so nothing is necessary on before.
19 const codeServer = new CodeServer(name, codeServerArgs, codeServerEnv, undefined)
20
21 // Kill code-server after the suite has ended. This may happen even without
22 // doing it explicitly but it seems prudent to be sure.
23 test.afterAll(async () => {
24 await codeServer.close()
25 })
26
27 test.use({
28 // Makes `codeServer` and `authenticated` available to the extend call
29 // below.
30 codeServer,
31 // NOTE@jsjoeio some tests use --cert which uses a self-signed certificate
32 // without this option, those tests will fail.
33 ignoreHTTPSErrors: true,
34 })
35
36 fn(codeServer)
37 })
38}
39
40interface TestFixtures {
41 codeServer: CodeServer

Callers 15

terminal.test.tsFile · 0.90
codeServer.test.tsFile · 0.90
appName.test.tsFile · 0.90
login.test.tsFile · 0.90
uploads.test.tsFile · 0.90
webview.test.tsFile · 0.90
github.test.tsFile · 0.90
downloads.test.tsFile · 0.90
routes.test.tsFile · 0.90
extensions.test.tsFile · 0.90
help.test.tsFile · 0.85

Calls 1

closeMethod · 0.95

Tested by

no test coverage detected