From 545e7db5bdac6e39962390469767667bc62857fd Mon Sep 17 00:00:00 2001 From: KernelDeimos Date: Fri, 6 Dec 2024 12:09:23 -0500 Subject: [PATCH] fix: test issues from contextlink removal Apparently there were two things: - had to remove contextlink from the test command (that was expected) - can't import libs from putility in the test environment. The error produced for this doesn't really explain why. --- package.json | 2 +- src/phoenix/src/util/statemachine.js | 4 ++-- src/phoenix/test/coreutils/harness.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 613ccb2e..e00e4c02 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "webpack-cli": "^5.1.1" }, "scripts": { - "test": "npx mocha src/phoenix/test src/contextlink/test && node src/backend/tools/test", + "test": "npx mocha src/phoenix/test && node src/backend/tools/test", "start=gui": "nodemon --exec \"node dev-server.js\" ", "start": "node ./tools/run-selfhosted.js", "build": "cd src/gui; node ./build.js", diff --git a/src/phoenix/src/util/statemachine.js b/src/phoenix/src/util/statemachine.js index c0c9d7ad..a71de1e9 100644 --- a/src/phoenix/src/util/statemachine.js +++ b/src/phoenix/src/util/statemachine.js @@ -17,8 +17,8 @@ * along with this program. If not, see . */ import { disallowAccessToUndefined } from "./lang.js"; -import { libs } from '@heyputer/putility'; -const { Context } = libs.context; +import putility from '@heyputer/putility'; +const { Context } = putility.libs.context; export class StatefulProcessor { constructor (params) { diff --git a/src/phoenix/test/coreutils/harness.js b/src/phoenix/test/coreutils/harness.js index da7c49fa..1de0e93b 100644 --- a/src/phoenix/test/coreutils/harness.js +++ b/src/phoenix/test/coreutils/harness.js @@ -16,8 +16,8 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -import { libs } from '@heyputer/putility'; -const { Context } = libs.context; +import putility from '@heyputer/putility'; +const { Context } = putility.libs.context; import { SyncLinesReader } from '../../src/ansi-shell/ioutil/SyncLinesReader.js'; import { CommandStdinDecorator } from '../../src/ansi-shell/pipeline/iowrappers.js'; import { ReadableStream, WritableStream } from 'stream/web'