diff --git a/arkoala/ets-plugin/.gitlab-ci.yml b/arkoala/ets-plugin/.gitlab-ci.yml index 1f26c8b83a4984e34c532e535682902da4c2f856..b23b44b2c9361bb758128fdc179bbbca8fa9ce57 100644 --- a/arkoala/ets-plugin/.gitlab-ci.yml +++ b/arkoala/ets-plugin/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2024 Huawei Device Co., Ltd. +# Copyright (c) 2022-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -45,6 +45,7 @@ test ets-plugin (arkoala): - build compat - build common - build ets-plugin + - build harness test ets-plugin (arkts): stage: test @@ -61,6 +62,7 @@ test ets-plugin (arkts): - build compat - build common - build ets-plugin + - build harness test ets-plugin (koala): stage: test @@ -77,6 +79,7 @@ test ets-plugin (koala): - build compat - build common - build ets-plugin + - build harness test ets-plugin (arkoala spec): stage: test @@ -94,6 +97,7 @@ test ets-plugin (arkoala spec): - build compat - build common - build ets-plugin + - build harness test ets-plugin (arkts spec): stage: test @@ -111,6 +115,7 @@ test ets-plugin (arkts spec): - build compat - build common - build ets-plugin + - build harness test ets-plugin (koala spec): stage: test @@ -128,6 +133,7 @@ test ets-plugin (koala spec): - build compat - build common - build ets-plugin + - build harness pack ets-plugin: extends: diff --git a/arkoala/ets-plugin/oh-package.json5 b/arkoala/ets-plugin/oh-package.json5 index 48b4bce3620d3e280c602532ca8435f1a723635a..17a0cd831c24ba6eff3e4e57842128407f08338f 100644 --- a/arkoala/ets-plugin/oh-package.json5 +++ b/arkoala/ets-plugin/oh-package.json5 @@ -24,11 +24,8 @@ "keywords": [], "dependencies": {}, "devDependencies": { - "@types/chai": "^4.3.1", - "@types/mocha": "^9.1.0", "@typescript-eslint/eslint-plugin": "^5.20.0", "@typescript-eslint/parser": "^5.20.0", - "chai": "^4.3.6", "eslint": "^8.13.0", "eslint-plugin-unused-imports": "^2.0.0", "mocha": "^9.2.2", diff --git a/arkoala/ets-plugin/package.json b/arkoala/ets-plugin/package.json index 229020c03332b759c8d660da6e200d5993a5845e..449497d3f3ada8593bdfbdec2716f964a6a14373 100644 --- a/arkoala/ets-plugin/package.json +++ b/arkoala/ets-plugin/package.json @@ -40,14 +40,13 @@ "clean": "rimraf build test/spec test/specification/ets2bundle" }, "keywords": [], - "dependencies": {}, + "dependencies": { + "@koalaui/harness": "1.5.4+devel" + }, "devDependencies": { "@koalaui/ets-tsc": "4.9.5-r4", - "@types/chai": "^4.3.1", - "@types/mocha": "^9.1.0", "@typescript-eslint/eslint-plugin": "^5.20.0", "@typescript-eslint/parser": "^5.20.0", - "chai": "^4.3.6", "eslint": "^8.13.0", "eslint-plugin-unused-imports": "^2.0.0", "mocha": "^9.2.2", diff --git a/arkoala/ets-plugin/test/rewrites.test.ts b/arkoala/ets-plugin/test/rewrites.test.ts index 42b6978a4b63fd6800f01376c92ac39ceeb3709a..6a0a433dc4b90090cdac3d2d3e8a8f6e90904c54 100644 --- a/arkoala/ets-plugin/test/rewrites.test.ts +++ b/arkoala/ets-plugin/test/rewrites.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,6 +13,7 @@ * limitations under the License. */ +import { suite, test } from "@koalaui/harness" import { assertGeneratedEqualsGolden, testFolder } from "./utils" suite("Basic rewrites of ArkUI syntactic features", () => { diff --git a/arkoala/ets-plugin/test/specification/specification.test.ts b/arkoala/ets-plugin/test/specification/specification.test.ts index ab0ba5ec5975f42d06abfe719829b8fc3517e474..fd23a8e6b113747fc312968ce0d6ecb9cd34b3f0 100644 --- a/arkoala/ets-plugin/test/specification/specification.test.ts +++ b/arkoala/ets-plugin/test/specification/specification.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,6 +13,7 @@ * limitations under the License. */ +import { suite } from "@koalaui/harness" import { directoriesManager, testsForDirectories } from "../utils"; suite("ArkUI specification", () => { diff --git a/arkoala/ets-plugin/test/utils.ts b/arkoala/ets-plugin/test/utils.ts index aba4f32aa171fa825c3a1bd52e934203cca5f713..f278a6741a932810e345503d244e9eed39594183 100644 --- a/arkoala/ets-plugin/test/utils.ts +++ b/arkoala/ets-plugin/test/utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,7 +15,7 @@ import * as path from 'path' import * as fs from 'fs' -import { assert } from "chai" +import { Assert as assert } from "@koalaui/harness" import * as child from "child_process" export function testFolder(folder: string) { diff --git a/incremental/compat/oh-package.json5 b/incremental/compat/oh-package.json5 index 0a0d59e032e1385e8de62349b8ef74ec9deb99ee..45b5a9768f2ef397c1b1f7c78502158d4e488950 100644 --- a/incremental/compat/oh-package.json5 +++ b/incremental/compat/oh-package.json5 @@ -20,15 +20,10 @@ "dependencies": { }, "devDependencies": { - "@ohos/hypium": "1.0.6", - "@types/chai": "^4.3.1", - "@types/mocha": "^9.1.0", "@typescript-eslint/eslint-plugin": "^5.20.0", "@typescript-eslint/parser": "^5.20.0", - "chai": "^4.3.6", "eslint": "^8.13.0", "eslint-plugin-unused-imports": "^2.0.0", - "mocha": "^9.2.2", "source-map-support": "^0.5.21" } } diff --git a/incremental/compat/package.json b/incremental/compat/package.json index 97ea035f5d480719279b363a0da2c4191dcebf40..22361f2417292764ca21d0286a02ee51eed70dd1 100644 --- a/incremental/compat/package.json +++ b/incremental/compat/package.json @@ -33,15 +33,10 @@ "keywords": [], "dependencies": {}, "devDependencies": { - "@ohos/hypium": "1.0.6", - "@types/chai": "^4.3.1", - "@types/mocha": "^9.1.0", "@typescript-eslint/eslint-plugin": "^5.20.0", "@typescript-eslint/parser": "^5.20.0", - "chai": "^4.3.6", "eslint": "^8.13.0", "eslint-plugin-unused-imports": "^2.0.0", - "mocha": "^9.2.2", "source-map-support": "^0.5.21" } } \ No newline at end of file diff --git a/incremental/compiler-plugin/.gitlab-ci.yml b/incremental/compiler-plugin/.gitlab-ci.yml index 415b70528acdb53b082c39b2fe72fd1ed915badf..84bf44371daa457a509fd0e7f478f2e51cbe5c01 100644 --- a/incremental/compiler-plugin/.gitlab-ci.yml +++ b/incremental/compiler-plugin/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2023 Huawei Device Co., Ltd. +# Copyright (c) 2022-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -49,6 +49,7 @@ test compiler-plugin: - build compat - build common - build compiler-plugin + - build harness pack compiler-plugin: extends: diff --git a/incremental/compiler-plugin/oh-package.json5 b/incremental/compiler-plugin/oh-package.json5 index eaac79d1ba3ec3292efb5cfdc5f9d6a7234dc95d..a3fd33cd550508accf6f1ea44137dd8a7065e447 100644 --- a/incremental/compiler-plugin/oh-package.json5 +++ b/incremental/compiler-plugin/oh-package.json5 @@ -13,11 +13,8 @@ "@koalaui/common": "1.4.1+devel" }, "devDependencies": { - "@types/chai": "^4.3.1", - "@types/mocha": "^9.1.0", "@typescript-eslint/eslint-plugin": "^5.20.0", "@typescript-eslint/parser": "^5.20.0", - "chai": "^4.3.6", "eslint": "^8.13.0", "eslint-plugin-unused-imports": "^2.0.0", "mocha": "^9.2.2", diff --git a/incremental/compiler-plugin/package.json b/incremental/compiler-plugin/package.json index dccd66d6457b05f1ed1d8f70ff0bc6b45388a4fb..cdba60bf8bf2c844be9ceb4c220d234e1c8e4d8b 100644 --- a/incremental/compiler-plugin/package.json +++ b/incremental/compiler-plugin/package.json @@ -10,14 +10,12 @@ ], "keywords": [], "dependencies": { - "@koalaui/common": "1.5.4+devel" + "@koalaui/common": "1.5.4+devel", + "@koalaui/harness": "1.5.4+devel" }, "devDependencies": { - "@types/chai": "^4.3.1", - "@types/mocha": "^9.1.0", "@typescript-eslint/eslint-plugin": "^5.20.0", "@typescript-eslint/parser": "^5.20.0", - "chai": "^4.3.6", "eslint": "^8.13.0", "eslint-plugin-unused-imports": "^2.0.0", "mocha": "^9.2.2", diff --git a/incremental/compiler-plugin/test/auto_detect.test.ts b/incremental/compiler-plugin/test/auto_detect.test.ts index ea6993fa6a06b604f2a01f3c7359e7cd4ce234b7..e1dea4fd128fdeccb5025858fa70755466a82a44 100644 --- a/incremental/compiler-plugin/test/auto_detect.test.ts +++ b/incremental/compiler-plugin/test/auto_detect.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,9 +13,9 @@ * limitations under the License. */ +import { Assert as assert, suite, test } from "@koalaui/harness" import { Context } from "./context.test" import { log, getLogFiltered, resetLog } from "./util.test" -import { assert } from "chai" const someId = "xxx" diff --git a/incremental/compiler-plugin/test/basic.test.ts b/incremental/compiler-plugin/test/basic.test.ts index 26d9b039a4374d35cffd858dc93aa4f0e733e569..f701ccffddff6d73bb3af9288caa902058e8bdf6 100644 --- a/incremental/compiler-plugin/test/basic.test.ts +++ b/incremental/compiler-plugin/test/basic.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,13 +13,13 @@ * limitations under the License. */ +import { Assert as assert, suite, test } from "@koalaui/harness" import { qox, til, zex as wax, accessId, juv, Zan, ryq, bae } from "./module.test" import { exported } from "./exports.test" import defexport from "./default-export.test" import { E } from "./export-as.test" import { __id, Context } from "./context.test" import { log, getLogFiltered, resetLog, cleanDumpDirectory, checkDump } from "./util.test" -import { assert } from "chai" const someId = "xxx" diff --git a/incremental/compiler-plugin/test/diagnostics/diagnostics.test.ts b/incremental/compiler-plugin/test/diagnostics/diagnostics.test.ts index f7bf8a98101f59e369cb282b4325d34926da13d4..7895b1b6095a3a6d13cdb4d659ee1253a432508b 100644 --- a/incremental/compiler-plugin/test/diagnostics/diagnostics.test.ts +++ b/incremental/compiler-plugin/test/diagnostics/diagnostics.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,7 +13,7 @@ * limitations under the License. */ -import { assert } from "chai" +import { Assert as assert, suite, test } from "@koalaui/harness" import * as child from "child_process" import * as path from "path" diff --git a/incremental/compiler-plugin/test/function_return.test.ts b/incremental/compiler-plugin/test/function_return.test.ts index 69b219597dde9ec048eb22cedc31d8b252f6240e..575ebcd99f7de50686d418a04bde30baa7a74337 100644 --- a/incremental/compiler-plugin/test/function_return.test.ts +++ b/incremental/compiler-plugin/test/function_return.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,8 +13,8 @@ * limitations under the License. */ +import { Assert as assert, suite, test } from "@koalaui/harness" import { Context } from "./context.test" -import { assert } from "chai" const someId = "xxx" diff --git a/incremental/compiler-plugin/test/parenthesised-call.test.ts b/incremental/compiler-plugin/test/parenthesised-call.test.ts index ec35ac2962ef615b81fba1c0c481736880afa7cf..2b6daae7725d35c3566898bcf4db2a1668b306d0 100644 --- a/incremental/compiler-plugin/test/parenthesised-call.test.ts +++ b/incremental/compiler-plugin/test/parenthesised-call.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,9 +13,9 @@ * limitations under the License. */ +import { suite, test } from "@koalaui/harness" // import { Context } from "./context.test" import { checkDump } from "./util.test" -// import { assert } from "chai" // const someId: string = "xxx" diff --git a/incremental/compiler-plugin/test/util.test.ts b/incremental/compiler-plugin/test/util.test.ts index d0f1f469c2762d6edfd85b829f0588f452171866..46d738546846eee8923d307057d9f99282f80ee2 100644 --- a/incremental/compiler-plugin/test/util.test.ts +++ b/incremental/compiler-plugin/test/util.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,9 +13,9 @@ * limitations under the License. */ +import { Assert as assert, test } from "@koalaui/harness" import * as path from "path" import * as fs from "fs" -import { assert } from "chai" let logText: string = "" diff --git a/incremental/compiler-plugin/test/variable_declaration.test.ts b/incremental/compiler-plugin/test/variable_declaration.test.ts index c97d223bd938ac7fb9b1f96831df7d469212e6e8..f352d644a882462318ce2d3fde51b5e9ff2586a0 100644 --- a/incremental/compiler-plugin/test/variable_declaration.test.ts +++ b/incremental/compiler-plugin/test/variable_declaration.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,9 +13,9 @@ * limitations under the License. */ +import { Assert as assert, suite, test } from "@koalaui/harness" import { Context } from "./context.test" import { checkDump } from "./util.test" -import { assert } from "chai" const someId = "xxx" diff --git a/incremental/compiler-plugin/test/whole_file.test.ts b/incremental/compiler-plugin/test/whole_file.test.ts index fe813a0e18f866cf8c480eccfb025760a5791d70..56d9801c0169cb5eac1dfc943886b735503cab8e 100644 --- a/incremental/compiler-plugin/test/whole_file.test.ts +++ b/incremental/compiler-plugin/test/whole_file.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,8 +13,8 @@ * limitations under the License. */ +import { Assert as assert, suite, test } from "@koalaui/harness" import * as fs from "fs" -import { assert } from "chai" function assertUnmemoizedEqualGolden(filename: string) { const unmemoized = fs.readFileSync(`./test/unmemoized/${filename}`, "utf8"); diff --git a/incremental/compiler-plugin/test/wrap_object_literal.test.ts b/incremental/compiler-plugin/test/wrap_object_literal.test.ts index 24ea67b2dbacf7e7f78b215a83c9963036af7d38..3e6b54e476c8d30fb2b99e403c3f865254507693 100644 --- a/incremental/compiler-plugin/test/wrap_object_literal.test.ts +++ b/incremental/compiler-plugin/test/wrap_object_literal.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,9 +13,9 @@ * limitations under the License. */ +import { Assert as assert, suite, test } from "@koalaui/harness" import { Context } from "./context.test" import { checkDump } from "./util.test" -import { assert } from "chai" const someId = "xxx" diff --git a/incremental/harness/js/register.js b/incremental/harness/js/register.js new file mode 100644 index 0000000000000000000000000000000000000000..c87312c19b58b9ab7a5961d80417953c323ff017 --- /dev/null +++ b/incremental/harness/js/register.js @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { goldenSetup } from "./golden.js" + +const tsNode = require("ts-node") +const path = require("path") + +goldenSetup('.', '.') + +unmemoized_suffix = process.env.UNMEMOIZED_SUFFIX +if (unmemoized_suffix == undefined) { + unmemoized_suffix = '' +} + +tsNode.register({ + files: true, + // If uncommented, running tests doesn't perform type checks. + // transpileOnly: true, + project: path.resolve(`test`, `tsconfig${unmemoized_suffix}.json`), + compiler: "@koalaui/ets-tsc" +}) diff --git a/incremental/harness/package.json b/incremental/harness/package.json index fe784704c4fc38d73cfb82fe1c38f2ea2f62a165..c5abcd8edd46621026c32158bb25d4ccaa059f94 100644 --- a/incremental/harness/package.json +++ b/incremental/harness/package.json @@ -6,6 +6,7 @@ "types": "build/src/index.d.ts", "files": [ "js/golden.js", + "js/register.js", "build/src/**/*.js", "build/src/**/*.d.ts" ], @@ -20,6 +21,7 @@ }, "exports": { "./golden": "./js/golden.js", + "./register": "./js/register.js", ".": "./build/src/index.js" }, "scripts": { diff --git a/incremental/package.json b/incremental/package.json index 824bca843fcbe0fd30882dda27a8380768b263f0..edf0174288fcd2839cdbb532f218b93a8894046e 100644 --- a/incremental/package.json +++ b/incremental/package.json @@ -11,8 +11,6 @@ "compiler-plugin" ], "devDependencies": { - "@types/chai": "4.3.10", - "chai": "4.3.10", "ts-node": "^10.7.0", "ts-patch": "^2.1.0", "tslib": "^2.3.1", diff --git a/incremental/runtime/.gitlab-ci.yml b/incremental/runtime/.gitlab-ci.yml index 56b5b2e8df0dcc98148d93c179ab084dc2a981df..d6ef49604f80cc0fe56addb41b794cf0605cee78 100644 --- a/incremental/runtime/.gitlab-ci.yml +++ b/incremental/runtime/.gitlab-ci.yml @@ -51,6 +51,7 @@ test runtime: - build compat - build compiler-plugin - build runtime + - build harness test runtime (ArkTS): stage: test diff --git a/incremental/runtime/oh-package.json5 b/incremental/runtime/oh-package.json5 index c282b88267d0fcb8d07ff9598ac6767dcfed0f7e..5dc6bc9a7ee88cbec864e256c26b38e1cf37535e 100644 --- a/incremental/runtime/oh-package.json5 +++ b/incremental/runtime/oh-package.json5 @@ -25,11 +25,8 @@ "@koalaui/compat": "1.4.1+devel" }, "devDependencies": { - "@types/chai": "^4.3.1", - "@types/mocha": "^9.1.0", "@typescript-eslint/eslint-plugin": "^5.20.0", "@typescript-eslint/parser": "^5.20.0", - "chai": "^4.3.6", "eslint": "^8.13.0", "eslint-plugin-unused-imports": "^2.0.0", "mocha": "^9.2.2", diff --git a/incremental/runtime/package.json b/incremental/runtime/package.json index aa8066c4ccb4770007ab53893b8f1b73c2b9f623..8dc62e078c6a078c5c23371a9f38e8f646fd9ba6 100644 --- a/incremental/runtime/package.json +++ b/incremental/runtime/package.json @@ -46,11 +46,8 @@ "@koalaui/harness": "1.5.4+devel" }, "devDependencies": { - "@types/chai": "^4.3.1", - "@types/mocha": "^9.1.0", "@typescript-eslint/eslint-plugin": "^5.20.0", "@typescript-eslint/parser": "^5.20.0", - "chai": "^4.3.6", "eslint": "^8.13.0", "eslint-plugin-unused-imports": "^2.0.0", "mocha": "^9.2.2", diff --git a/incremental/runtime/test/animation/Easing.test.ts b/incremental/runtime/test/animation/Easing.test.ts index f648ccf370d562d9078a57c4195a47c3574f7302..8b41c853c6aa1d207c4f42e4fce6b688922a8d31 100644 --- a/incremental/runtime/test/animation/Easing.test.ts +++ b/incremental/runtime/test/animation/Easing.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,7 +13,7 @@ * limitations under the License. */ -import { assert } from "chai" +import { Assert as assert, suite, test } from "@koalaui/harness" import { Easing, EasingCurve, EasingStepJump } from "../../src/animation/Easing" function assertEasing(easing: EasingCurve, ...expected: number[]) { diff --git a/incremental/runtime/test/common/MarkableQueue.test.ts b/incremental/runtime/test/common/MarkableQueue.test.ts index 58f9de2b1fd1cb6c0d9e35fcf1a564d4a50ce60c..7d7aa326defda98956dc478aaa585564b6bd3437 100644 --- a/incremental/runtime/test/common/MarkableQueue.test.ts +++ b/incremental/runtime/test/common/MarkableQueue.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,8 +13,8 @@ * limitations under the License. */ +import { Assert, suite, test } from "@koalaui/harness" import { MarkableQueue, markableQueue } from "@koalaui/common" -import { assert as Assert } from "chai" const collector = new Array() diff --git a/incremental/runtime/test/memo/bind.test.ts b/incremental/runtime/test/memo/bind.test.ts index 0fe1ab75a54a15265479aa8021f9815360afe8e8..d889d47fce5e2e25f021efae255f89a204d534ab 100644 --- a/incremental/runtime/test/memo/bind.test.ts +++ b/incremental/runtime/test/memo/bind.test.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import { assert } from "chai" +import { Assert as assert, suite, test } from "@koalaui/harness" import { GlobalStateManager, State, diff --git a/incremental/runtime/test/memo/changeListener.test.ts b/incremental/runtime/test/memo/changeListener.test.ts index 975be91f173420adc5d41dac8d6071b5f5fb4981..e200f0d9b2e57556380c030afe8d636f8283687f 100644 --- a/incremental/runtime/test/memo/changeListener.test.ts +++ b/incremental/runtime/test/memo/changeListener.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,7 +13,7 @@ * limitations under the License. */ -import { assert } from "chai" +import { Assert as assert, suite, test } from "@koalaui/harness" import { GlobalStateManager, OnChange, diff --git a/incremental/runtime/test/memo/contextLocal.test.ts b/incremental/runtime/test/memo/contextLocal.test.ts index 4d901e4e3d6d7ba68ad45ca33458e43dbcc209ff..b0cc6cfc9c346b507fbac074988d9128a3dd6d0c 100644 --- a/incremental/runtime/test/memo/contextLocal.test.ts +++ b/incremental/runtime/test/memo/contextLocal.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,7 +13,7 @@ * limitations under the License. */ -import { assert } from "chai" +import { Assert as assert, suite, test } from "@koalaui/harness" import { State, TestNode, diff --git a/incremental/runtime/test/memo/remember.test.ts b/incremental/runtime/test/memo/remember.test.ts index a5c53f9d7b00cd3236347285bf53278f5a25dd57..3596bb8dfdc4c4c1958f6c2e748bf916b1c9291d 100644 --- a/incremental/runtime/test/memo/remember.test.ts +++ b/incremental/runtime/test/memo/remember.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,7 +13,7 @@ * limitations under the License. */ -import { assert } from "chai" +import { Assert as assert, suite, test } from "@koalaui/harness" import { GlobalStateManager, State, diff --git a/incremental/runtime/test/memo/repeat.test.ts b/incremental/runtime/test/memo/repeat.test.ts index 392cd1a1e196ad4b4e14367275a72bac2416c4b8..f489f8a4baef5d1abfa1565a535dbf8c5bf1f7fe 100644 --- a/incremental/runtime/test/memo/repeat.test.ts +++ b/incremental/runtime/test/memo/repeat.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,7 +13,7 @@ * limitations under the License. */ -import { assert } from "chai" +import { Assert as assert, suite, test } from "@koalaui/harness" import { UniqueId, KoalaCallsiteKey } from "@koalaui/common" import { GlobalStateManager, diff --git a/incremental/runtime/test/states/Journal.test.ts b/incremental/runtime/test/states/Journal.test.ts index 712e8b5506b84c2c80225225113fd839afbc612d..74439ca867d8efd6ef36cf98fa712a5a35108037 100644 --- a/incremental/runtime/test/states/Journal.test.ts +++ b/incremental/runtime/test/states/Journal.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,7 +13,7 @@ * limitations under the License. */ -import { assert as Assert } from "chai" +import { Assert, suite, test } from "@koalaui/harness" import { Changes, Journal } from "../../src/states/Journal" function assertChange(changes: Changes | undefined, state: Object, expected: Value) { diff --git a/incremental/runtime/test/states/State.test.ts b/incremental/runtime/test/states/State.test.ts index 65c7d833be3c3ecdb7eedd07f86cf56d0708fcde..99e5edacc4f83f63d298b519c4f67a8ab50f1e9a 100644 --- a/incremental/runtime/test/states/State.test.ts +++ b/incremental/runtime/test/states/State.test.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import { assert } from "chai" +import { Assert as assert, suite, test } from "@koalaui/harness" import { UniqueId, KoalaCallsiteKey } from "@koalaui/common" import { IncrementalNode, MutableState, State, TestNode, testUpdate, ValueTracker } from "../../src" import { createStateManager } from "../../src/states/State" diff --git a/incremental/runtime/test/states/state_basics.test.ts b/incremental/runtime/test/states/state_basics.test.ts index 3652ecaf32ee1948a56b9d112283cd19b1471fcc..13f667e59e0c772c57240071c94e0b75e6a1a360 100644 --- a/incremental/runtime/test/states/state_basics.test.ts +++ b/incremental/runtime/test/states/state_basics.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,7 +13,7 @@ * limitations under the License. */ -import { assert } from "chai" +import { Assert as assert, suite, test } from "@koalaui/harness" import { uint32 } from "@koalaui/common" import { GlobalStateManager, diff --git a/incremental/runtime/test/tree/TreeNode.test.ts b/incremental/runtime/test/tree/TreeNode.test.ts index 365db44ca098768f8f621c67c7d8174892dd7c4d..3fae69b18d5d780d10f20d87ec14ad533d34a3aa 100644 --- a/incremental/runtime/test/tree/TreeNode.test.ts +++ b/incremental/runtime/test/tree/TreeNode.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,7 +13,7 @@ * limitations under the License. */ -import { assert } from "chai" +import { Assert as assert, suite, test } from "@koalaui/harness" import { TreeNode } from "../../src/tree/TreeNode" class StringNode extends TreeNode { diff --git a/incremental/runtime/test/tree/TreePath.test.ts b/incremental/runtime/test/tree/TreePath.test.ts index 0a3110f6d10908f14b79a5cc564e686b37c9409e..f13e34178282acc8b9a340f77058baeea7e91835 100644 --- a/incremental/runtime/test/tree/TreePath.test.ts +++ b/incremental/runtime/test/tree/TreePath.test.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,7 +13,7 @@ * limitations under the License. */ -import { assert } from "chai" +import { Assert as assert, suite, test } from "@koalaui/harness" import { TreePath } from "../../src/tree/TreePath" suite("TreePath", () => { diff --git a/interop/oh-package.json5 b/interop/oh-package.json5 index 2db4af57c8bbc7970b3768d31486042d2a2da2d0..96d62e6ba578ed9f403c2420ed03112d3c7f329c 100644 --- a/interop/oh-package.json5 +++ b/interop/oh-package.json5 @@ -49,14 +49,10 @@ "@koalaui/common": "1.4.1+devel" }, "devDependencies": { - "@types/chai": "^4.3.1", - "@types/mocha": "^9.1.0", "@typescript-eslint/eslint-plugin": "^5.20.0", "@typescript-eslint/parser": "^5.20.0", - "chai": "^4.3.6", "eslint": "^8.13.0", "eslint-plugin-unused-imports": "^2.0.0", - "mocha": "^9.2.2", "source-map-support": "^0.5.21" } } diff --git a/interop/package.json b/interop/package.json index cc1f724733d742fff9ebd82761ebe05f8ab811f0..b6b67eae84638a62bf2b34ab806fa25bf16ce3a6 100644 --- a/interop/package.json +++ b/interop/package.json @@ -61,15 +61,11 @@ }, "devDependencies": { "@ohos/hypium": "1.0.6", - "@types/chai": "^4.3.1", "@types/node": "^18.0.0", - "@types/mocha": "^9.1.0", "@typescript-eslint/eslint-plugin": "^5.20.0", "@typescript-eslint/parser": "^5.20.0", - "chai": "^4.3.6", "eslint": "^8.13.0", "eslint-plugin-unused-imports": "^2.0.0", - "mocha": "^9.2.2", "source-map-support": "^0.5.21", "@koalaui/ets-tsc": "4.9.5-r4", "@koalaui/fast-arktsc": "next"