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 19c9c23

Browse files
GirlBossRushjsjoeio
authored andcommitted
Touch up build, tests.
1 parent ad787bb commit 19c9c23

File tree

5 files changed

+54
-57
lines changed

5 files changed

+54
-57
lines changed

‎ci/build/build-vscode.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ main() {
1313

1414
# extensions-ci compiles extensions and includes their media.
1515
# compile-web compiles web extensions. TODO: Unsure if used.
16-
yarn gulp extensions-ci compile-web "vscode-server${MINIFY:+-min}"
16+
yarn gulp extensions-ci compile-web "vscode-reh-web${MINIFY:+-min}"
1717
}
1818

1919
main "$@"

‎src/node/cli.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ export function splitOnFirstEquals(str: string): string[] {
274274
return split
275275
}
276276

277-
const createDefaultArgs = (): Args => {
277+
exportconst createDefaultArgs = (): Args => {
278278
return {
279279
_: [],
280280
workspace: "",

‎test/unit/node/app.test.ts‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import * as http from "http"
44
import * as https from "https"
55
import * as path from "path"
66
import { createApp, ensureAddress, handleArgsSocketCatchError, handleServerError } from "../../../src/node/app"
7-
import { OptionalString, setDefaults } from "../../../src/node/cli"
7+
import { createDefaultArgs,OptionalString, setDefaults } from "../../../src/node/cli"
88
import { generateCertificate } from "../../../src/node/util"
99
import { getAvailablePort, tmpdir } from "../../utils/helpers"
1010

1111
describe("createApp", () => {
1212
let spy: jest.SpyInstance
1313
let unlinkSpy: jest.SpyInstance
14-
let port: number
14+
let port: string
1515
let tmpDirPath: string
1616
let tmpFilePath: string
1717

@@ -29,7 +29,7 @@ describe("createApp", () => {
2929
// then you can spy on those modules methods, like unlink.
3030
// See: https://github.com/aelbore/esbuild-jest/issues/26#issuecomment-893763840
3131
unlinkSpy = jest.spyOn(promises, "unlink")
32-
port = await getAvailablePort()
32+
port = (await getAvailablePort()).toString()
3333
})
3434

3535
afterEach(() => {
@@ -44,8 +44,8 @@ describe("createApp", () => {
4444

4545
it("should return an Express app, a WebSockets Express app and an http server", async () => {
4646
const defaultArgs = await setDefaults({
47+
...createDefaultArgs(),
4748
port,
48-
_: [],
4949
})
5050
const app = await createApp(defaultArgs)
5151

@@ -61,8 +61,8 @@ describe("createApp", () => {
6161

6262
it("should handle error events on the server", async () => {
6363
const defaultArgs = await setDefaults({
64+
...createDefaultArgs(),
6465
port,
65-
_: [],
6666
})
6767

6868
const app = await createApp(defaultArgs)
@@ -82,10 +82,10 @@ describe("createApp", () => {
8282
it("should reject errors that happen before the server can listen", async () => {
8383
// We listen on an invalid port
8484
// causing the app to reject the Promise called at startup
85-
const port = 2
85+
const port = "2"
8686
const defaultArgs = await setDefaults({
87+
...createDefaultArgs(),
8788
port,
88-
_: [],
8989
})
9090

9191
async function masterBall() {
@@ -105,7 +105,7 @@ describe("createApp", () => {
105105
it("should unlink a socket before listening on the socket", async () => {
106106
await promises.writeFile(tmpFilePath, "")
107107
const defaultArgs = await setDefaults({
108-
_: [],
108+
...createDefaultArgs(),
109109
socket: tmpFilePath,
110110
})
111111

@@ -119,9 +119,9 @@ describe("createApp", () => {
119119
const testCertificate = await generateCertificate("localhost")
120120
const cert = new OptionalString(testCertificate.cert)
121121
const defaultArgs = await setDefaults({
122+
...createDefaultArgs(),
122123
port,
123124
cert,
124-
_: [],
125125
["cert-key"]: testCertificate.certKey,
126126
})
127127
const app = await createApp(defaultArgs)

0 commit comments

Comments
(0)

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