summaryrefslogtreecommitdiff
path: root/extension/src/test-suite/environmentSetup.test.ts
blob: 7610e70d60f662bb48ce568f798b333fbcf93897 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { test, describe } from "mocha";
import * as assert from "assert";

import { getContinueServerUrl } from "../bridge";
import { startContinuePythonServer } from "../activation/environmentSetup";
import fetch from "node-fetch";

describe("Can start python server", () => {
  test("Can start python server", async () => {
    await startContinuePythonServer();

    await new Promise((resolve) => setTimeout(resolve, 50));

    // Check if server is running
    const serverUrl = getContinueServerUrl();
    const response = await fetch(`${serverUrl}/health`);
    assert.equal(response.status, 200);
  });
});