From 039c65859704f6507d7193a965577537652115fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=A4der?= Date: Wed, 12 Jun 2024 14:57:24 +0200 Subject: [PATCH 01/16] Enable browser tests on all platforms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #13764 Contributed on behalf of STMicroelectronics Signed-off-by: Thomas Mäder --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 2bdf6bf21774a..efd09afe6360f 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -105,7 +105,7 @@ jobs: yarn test:theia - name: Test (browser) - if: matrix.tests != 'skip' && runner.os == 'Linux' + if: matrix.tests != 'skip' run: | xvfb-run -a yarn browser test From a42df1024e8b85784eb6dee974f9b5844230d298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=A4der?= Date: Wed, 12 Jun 2024 15:59:10 +0200 Subject: [PATCH 02/16] Remove xvfb-run. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Mäder --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index efd09afe6360f..49a1b2c72c5e6 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -107,7 +107,7 @@ jobs: - name: Test (browser) if: matrix.tests != 'skip' run: | - xvfb-run -a yarn browser test + yarn browser test - name: Test (electron) if: matrix.tests != 'skip' && runner.os == 'Linux' From 3743f5ab46c16f9fd978cb756f922acae4c08108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=A4der?= Date: Wed, 12 Jun 2024 16:43:23 +0200 Subject: [PATCH 03/16] Download plugins on all platforms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Mäder --- .github/workflows/ci-cd.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 49a1b2c72c5e6..47ba608d14711 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -83,7 +83,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9 - name: Download Plugins - if: runner.os == 'Linux' shell: bash run: | yarn -s download:plugins From 5f638e29279076f4a0873b7ed63604643187f84c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=A4der?= Date: Thu, 13 Jun 2024 15:07:35 +0200 Subject: [PATCH 04/16] Update OSs and remove Node 16 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Mäder --- .github/workflows/ci-cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 47ba608d14711..1ecc3286ac8c3 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -51,8 +51,8 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-2019, ubuntu-latest, macos-11] - node: [16.x, 18.x, 20.x] + os: [windows-latest, ubuntu-latest, macos-latest] + node: [18.x, 20.x] runs-on: ${{ matrix.os }} timeout-minutes: 60 From cb78be658e9123b0cd53b894f06af01535f2c832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=A4der?= Date: Fri, 21 Jun 2024 15:31:09 +0200 Subject: [PATCH 05/16] Update node-pty to 1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Mäder --- packages/process/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/process/package.json b/packages/process/package.json index bd159fc2c4dca..8a9105e304253 100644 --- a/packages/process/package.json +++ b/packages/process/package.json @@ -4,7 +4,7 @@ "description": "Theia process support.", "dependencies": { "@theia/core": "1.50.0", - "node-pty": "0.11.0-beta24", + "node-pty": "^1.0.0", "string-argv": "^0.1.1", "tslib": "^2.6.2" }, diff --git a/yarn.lock b/yarn.lock index f90c3d48d0083..34b6ac1724e18 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8611,10 +8611,10 @@ node-preload@^0.2.1: dependencies: process-on-spawn "^1.0.0" -node-pty@0.11.0-beta24: - version "0.11.0-beta24" - resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-0.11.0-beta24.tgz#084841017187656edaf14b459946c4a1d7cf8392" - integrity sha512-CzItw3hitX+wnpw9dHA/A+kcbV7ETNKrsyQJ+s0ZGzsu70+CSGuIGPLPfMnAc17vOrQktxjyRQfaqij75GVJFw== +node-pty@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-1.0.0.tgz#7daafc0aca1c4ca3de15c61330373af4af5861fd" + integrity sha512-wtBMWWS7dFZm/VgqElrTvtfMq4GzJ6+edFI0Y0zyzygUSZMgZdraDUMUhCIvkjhJjme15qWmbyJbtAx4ot4uZA== dependencies: nan "^2.17.0" From 116960cf40c954e293d05786346eb7d81e8e73ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=A4der?= Date: Fri, 21 Jun 2024 17:22:30 +0200 Subject: [PATCH 06/16] Fix linux build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Mäder --- .../native-webpack-plugin/src/native-webpack-plugin.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dev-packages/native-webpack-plugin/src/native-webpack-plugin.ts b/dev-packages/native-webpack-plugin/src/native-webpack-plugin.ts index eafa1a01ac386..03a290715619c 100644 --- a/dev-packages/native-webpack-plugin/src/native-webpack-plugin.ts +++ b/dev-packages/native-webpack-plugin/src/native-webpack-plugin.ts @@ -124,11 +124,7 @@ export class NativeWebpackPlugin { const dllFile = require.resolve('node-pty/build/Release/winpty.dll'); const targetDllFile = path.join(targetDirectory, 'winpty.dll'); await this.copyExecutable(dllFile, targetDllFile); - } else { - const sourceFile = require.resolve('node-pty/build/Release/spawn-helper'); - const targetFile = path.join(targetDirectory, 'spawn-helper'); - await this.copyExecutable(sourceFile, targetFile); - } + } } protected async copyTrashHelper(compiler: Compiler): Promise { From a8ba0d0ebca6ffbf2c7662009175e7740bd8a358 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=A4der?= Date: Sun, 23 Jun 2024 08:48:11 +0200 Subject: [PATCH 07/16] Fix linter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Mäder --- dev-packages/native-webpack-plugin/src/native-webpack-plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-packages/native-webpack-plugin/src/native-webpack-plugin.ts b/dev-packages/native-webpack-plugin/src/native-webpack-plugin.ts index 03a290715619c..7ff3c13e20fcc 100644 --- a/dev-packages/native-webpack-plugin/src/native-webpack-plugin.ts +++ b/dev-packages/native-webpack-plugin/src/native-webpack-plugin.ts @@ -124,7 +124,7 @@ export class NativeWebpackPlugin { const dllFile = require.resolve('node-pty/build/Release/winpty.dll'); const targetDllFile = path.join(targetDirectory, 'winpty.dll'); await this.copyExecutable(dllFile, targetDllFile); - } + } } protected async copyTrashHelper(compiler: Compiler): Promise { From f740533ed1a8055193c725a36ffacb3ac2de7e2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=A4der?= Date: Sun, 23 Jun 2024 09:14:00 +0200 Subject: [PATCH 08/16] Fix rejections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Mäder --- packages/process/src/node/terminal-process.spec.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/process/src/node/terminal-process.spec.ts b/packages/process/src/node/terminal-process.spec.ts index 9e73207078d40..51cffe889f705 100644 --- a/packages/process/src/node/terminal-process.spec.ts +++ b/packages/process/src/node/terminal-process.spec.ts @@ -40,9 +40,9 @@ describe('TerminalProcess', function (): void { it('test error on non existent path', async function (): Promise { const error = await new Promise((resolve, reject) => { const proc = terminalProcessFactory({ command: '/non-existent' }); - proc.onStart(reject); + proc.onStart(() => reject('process started')); proc.onError(resolve); - proc.onExit(reject); + proc.onExit(() => reject('process exited')); }); expect(error.code).eq('ENOENT'); @@ -59,7 +59,7 @@ describe('TerminalProcess', function (): void { const terminal = await new Promise((resolve, reject) => { const proc = terminalProcessFactory({ command, args }); proc.onExit(resolve); - proc.onError(reject); + proc.onError(() => reject('process errored')); }); expect(terminal.code).to.exist; @@ -68,9 +68,9 @@ describe('TerminalProcess', function (): void { it('test error on trying to execute a directory', async function (): Promise { const error = await new Promise((resolve, reject) => { const proc = terminalProcessFactory({ command: __dirname }); - proc.onStart(reject); + proc.onStart(() => reject('process started')); proc.onError(resolve); - proc.onExit(reject); + proc.onExit(() => reject('process exited')); }); if (isWindows) { From cd4db4ae6ed0355cd88bd39990a0671e0b31e769 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=A4der?= Date: Sun, 23 Jun 2024 09:32:41 +0200 Subject: [PATCH 09/16] Reject with Error() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Mäder --- packages/process/src/node/terminal-process.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/process/src/node/terminal-process.spec.ts b/packages/process/src/node/terminal-process.spec.ts index 51cffe889f705..0cdfab917fab7 100644 --- a/packages/process/src/node/terminal-process.spec.ts +++ b/packages/process/src/node/terminal-process.spec.ts @@ -40,9 +40,9 @@ describe('TerminalProcess', function (): void { it('test error on non existent path', async function (): Promise { const error = await new Promise((resolve, reject) => { const proc = terminalProcessFactory({ command: '/non-existent' }); - proc.onStart(() => reject('process started')); + proc.onStart(() => reject(new Error('process started'))); proc.onError(resolve); - proc.onExit(() => reject('process exited')); + proc.onExit(() => reject(new Error('process exited'))); }); expect(error.code).eq('ENOENT'); @@ -68,9 +68,9 @@ describe('TerminalProcess', function (): void { it('test error on trying to execute a directory', async function (): Promise { const error = await new Promise((resolve, reject) => { const proc = terminalProcessFactory({ command: __dirname }); - proc.onStart(() => reject('process started')); + proc.onStart(() => reject(new Error('process started'))); proc.onError(resolve); - proc.onExit(() => reject('process exited')); + proc.onExit(() => reject(new Error('process exited'))); }); if (isWindows) { From e3d695c5300686f4e9fd3aaa1d163591cc52a777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=A4der?= Date: Sun, 23 Jun 2024 10:17:58 +0200 Subject: [PATCH 10/16] Don't emit 'started' if no pid is returned MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Mäder --- packages/process/src/node/terminal-process.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/process/src/node/terminal-process.ts b/packages/process/src/node/terminal-process.ts index f6879af71a08d..d4ff643ad89ef 100644 --- a/packages/process/src/node/terminal-process.ts +++ b/packages/process/src/node/terminal-process.ts @@ -150,7 +150,9 @@ export class TerminalProcess extends Process { options.options || {} ); - process.nextTick(() => this.emitOnStarted()); + if (process.pid !== undefined) { + process.nextTick(() => this.emitOnStarted()); + } // node-pty actually wait for the underlying streams to be closed before emitting exit. // We should emulate the `exit` and `close` sequence. From 1988b7a4112a318205fcb76cb6ce9997b57448ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=A4der?= Date: Sun, 23 Jun 2024 11:37:20 +0200 Subject: [PATCH 11/16] Debug terminal process on unix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Mäder --- packages/process/src/node/terminal-process.spec.ts | 1 + packages/process/src/node/terminal-process.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/packages/process/src/node/terminal-process.spec.ts b/packages/process/src/node/terminal-process.spec.ts index 0cdfab917fab7..82650a6693798 100644 --- a/packages/process/src/node/terminal-process.spec.ts +++ b/packages/process/src/node/terminal-process.spec.ts @@ -40,6 +40,7 @@ describe('TerminalProcess', function (): void { it('test error on non existent path', async function (): Promise { const error = await new Promise((resolve, reject) => { const proc = terminalProcessFactory({ command: '/non-existent' }); + console.log(`pty is ${JSON.stringify(proc.debugString())}`); proc.onStart(() => reject(new Error('process started'))); proc.onError(resolve); proc.onExit(() => reject(new Error('process exited'))); diff --git a/packages/process/src/node/terminal-process.ts b/packages/process/src/node/terminal-process.ts index d4ff643ad89ef..23a27c599505d 100644 --- a/packages/process/src/node/terminal-process.ts +++ b/packages/process/src/node/terminal-process.ts @@ -135,6 +135,10 @@ export class TerminalProcess extends Process { this.inputStream = inputStream; } + debugString(): string { + return JSON.stringify(this.terminal); + } + /** * Helper for the constructor to attempt to create the pseudo-terminal encapsulating the shell process. * From 776518aa9d5a31d99f6ef5fce8944eaffe35264d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=A4der?= Date: Sun, 23 Jun 2024 15:22:48 +0200 Subject: [PATCH 12/16] Don't check for process started as it's not cross-platform MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Mäder --- packages/process/src/node/terminal-process.spec.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/process/src/node/terminal-process.spec.ts b/packages/process/src/node/terminal-process.spec.ts index 82650a6693798..c6bdb61d43666 100644 --- a/packages/process/src/node/terminal-process.spec.ts +++ b/packages/process/src/node/terminal-process.spec.ts @@ -41,7 +41,6 @@ describe('TerminalProcess', function (): void { const error = await new Promise((resolve, reject) => { const proc = terminalProcessFactory({ command: '/non-existent' }); console.log(`pty is ${JSON.stringify(proc.debugString())}`); - proc.onStart(() => reject(new Error('process started'))); proc.onError(resolve); proc.onExit(() => reject(new Error('process exited'))); }); @@ -69,7 +68,6 @@ describe('TerminalProcess', function (): void { it('test error on trying to execute a directory', async function (): Promise { const error = await new Promise((resolve, reject) => { const proc = terminalProcessFactory({ command: __dirname }); - proc.onStart(() => reject(new Error('process started'))); proc.onError(resolve); proc.onExit(() => reject(new Error('process exited'))); }); From b227ffdbef115ac2416d34b7788551a82d774bfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=A4der?= Date: Sun, 23 Jun 2024 15:54:56 +0200 Subject: [PATCH 13/16] Removing error case tests since they only test node-pty behavior. But that behavior is platform-dependent. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Mäder --- .../process/src/node/terminal-process.spec.ts | 46 ------------------- 1 file changed, 46 deletions(-) diff --git a/packages/process/src/node/terminal-process.spec.ts b/packages/process/src/node/terminal-process.spec.ts index c6bdb61d43666..c113339d74d22 100644 --- a/packages/process/src/node/terminal-process.spec.ts +++ b/packages/process/src/node/terminal-process.spec.ts @@ -34,54 +34,8 @@ beforeEach(() => { }); describe('TerminalProcess', function (): void { - this.timeout(20_000); - it('test error on non existent path', async function (): Promise { - const error = await new Promise((resolve, reject) => { - const proc = terminalProcessFactory({ command: '/non-existent' }); - console.log(`pty is ${JSON.stringify(proc.debugString())}`); - proc.onError(resolve); - proc.onExit(() => reject(new Error('process exited'))); - }); - - expect(error.code).eq('ENOENT'); - }); - - it('test implicit .exe (Windows only)', async function (): Promise { - const match = /^(.+)\.exe$/.exec(process.execPath); - if (!isWindows || !match) { - this.skip(); - } - - const command = match[1]; - const args = ['--version']; - const terminal = await new Promise((resolve, reject) => { - const proc = terminalProcessFactory({ command, args }); - proc.onExit(resolve); - proc.onError(() => reject('process errored')); - }); - - expect(terminal.code).to.exist; - }); - - it('test error on trying to execute a directory', async function (): Promise { - const error = await new Promise((resolve, reject) => { - const proc = terminalProcessFactory({ command: __dirname }); - proc.onError(resolve); - proc.onExit(() => reject(new Error('process exited'))); - }); - - if (isWindows) { - // On Windows, node-pty returns us a "File not found" message, so we can't really differentiate this case - // from trying to execute a non-existent file. node's child_process.spawn also returns ENOENT, so it's - // probably the best we can get. - expect(error.code).eq('ENOENT'); - } else { - expect(error.code).eq('EACCES'); - } - }); - it('test exit', async function (): Promise { const args = ['--version']; const exit = await new Promise((resolve, reject) => { From 2edb9d22f5519e326be3f93c840e049d3859a048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=A4der?= Date: Sun, 23 Jun 2024 16:09:56 +0200 Subject: [PATCH 14/16] Fix compile error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Mäder --- packages/process/src/node/terminal-process.spec.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/process/src/node/terminal-process.spec.ts b/packages/process/src/node/terminal-process.spec.ts index c113339d74d22..45c561bbbaef2 100644 --- a/packages/process/src/node/terminal-process.spec.ts +++ b/packages/process/src/node/terminal-process.spec.ts @@ -18,8 +18,7 @@ import * as process from 'process'; import * as stream from 'stream'; import { createProcessTestContainer } from './test/process-test-container'; import { TerminalProcessFactory } from './terminal-process'; -import { IProcessExitEvent, ProcessErrorEvent } from './process'; -import { isWindows } from '@theia/core/lib/common/os'; +import { IProcessExitEvent } from './process'; /** * Globals From b90b7a1871d11beae14c0c33e213c69d9b96bd02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=A4der?= Date: Sun, 23 Jun 2024 16:27:21 +0200 Subject: [PATCH 15/16] Remove test for non-existant failure. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Mäder --- packages/terminal/src/node/terminal-server.spec.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/terminal/src/node/terminal-server.spec.ts b/packages/terminal/src/node/terminal-server.spec.ts index 16e815d22d73c..7464ee1375e27 100644 --- a/packages/terminal/src/node/terminal-server.spec.ts +++ b/packages/terminal/src/node/terminal-server.spec.ts @@ -39,9 +39,4 @@ describe('TerminalServer', function (): void { const createResult = await terminalServer.create({ command: process.execPath, 'args': args }); expect(createResult).to.be.greaterThan(-1); }); - - it('test terminal create from non-existent path', async function (): Promise { - const createError = await terminalServer.create({ command: '/non-existent' }); - expect(createError).eq(-1); - }); }); From 84c664b0a2b75c9b92a584f2f654cb166487ff83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=A4der?= Date: Mon, 24 Jun 2024 10:56:27 +0200 Subject: [PATCH 16/16] Remove more "non-existent command" tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Mäder --- packages/task/src/node/task-server.slow-spec.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/task/src/node/task-server.slow-spec.ts b/packages/task/src/node/task-server.slow-spec.ts index 4c49bd6e8d272..d343f7df552d5 100644 --- a/packages/task/src/node/task-server.slow-spec.ts +++ b/packages/task/src/node/task-server.slow-spec.ts @@ -25,7 +25,6 @@ import * as https from 'https'; import { isWindows, isOSX } from '@theia/core/lib/common/os'; import { FileUri } from '@theia/core/lib/node'; import { terminalsPath } from '@theia/terminal/lib/common/terminal-protocol'; -import { expectThrowsAsync } from '@theia/core/lib/common/test/expect'; import { TestWebSocketChannelSetup } from '@theia/core/lib/node/messaging/test/test-web-socket-channel'; import { expect } from 'chai'; import URI from '@theia/core/lib/common/uri'; @@ -251,11 +250,6 @@ describe('Task server / back-end', function (): void { } }); - it('task using raw process can handle command that does not exist', async function (): Promise { - const p = taskServer.run(createProcessTaskConfig2('process', bogusCommand, []), wsRoot); - await expectThrowsAsync(p, 'ENOENT'); - }); - it('getTasks(ctx) returns tasks according to created context', async function (): Promise { const context1 = 'aContext'; const context2 = 'anotherContext';