mirror of
https://git.tuxpa.in/a/code-server.git
synced 2024-12-27 20:55:25 +00:00
Move wtfnode setup to global setup
I think Jest provides separate console methods for each test so when the socket tests finish Jest complains that a test keeps trying to output.
This commit is contained in:
parent
ef7e7271b6
commit
6685b3a4ff
@ -3,6 +3,7 @@
|
||||
// ensuring that we're logged in before we run any tests
|
||||
import { chromium } from "playwright"
|
||||
import { CODE_SERVER_ADDRESS, PASSWORD } from "./constants"
|
||||
import * as wtfnode from "./wtfnode"
|
||||
|
||||
module.exports = async () => {
|
||||
console.log("🚨 Running Global Setup for Jest Tests")
|
||||
@ -11,6 +12,8 @@ module.exports = async () => {
|
||||
const context = await browser.newContext()
|
||||
const page = await context.newPage()
|
||||
|
||||
wtfnode.setup()
|
||||
|
||||
await page.goto(CODE_SERVER_ADDRESS, { waitUntil: "domcontentloaded" })
|
||||
// Type in password
|
||||
await page.fill(".password", PASSWORD)
|
||||
|
@ -6,11 +6,8 @@ import * as tls from "tls"
|
||||
import { Emitter } from "../src/common/emitter"
|
||||
import { SocketProxyProvider } from "../src/node/socket"
|
||||
import { generateCertificate, tmpdir } from "../src/node/util"
|
||||
import * as wtfnode from "./wtfnode"
|
||||
|
||||
describe("SocketProxyProvider", () => {
|
||||
wtfnode.setup()
|
||||
|
||||
const provider = new SocketProxyProvider()
|
||||
|
||||
const onServerError = new Emitter<{ event: string; error: Error }>()
|
||||
|
Loading…
Reference in New Issue
Block a user