@cmmn/tools 1.9.13 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -2
- package/test/index.js +10 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cmmn/tools",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Compilation, bundling, code generator, testing.",
|
|
5
5
|
"main": "dist/rollup.config.js",
|
|
6
6
|
"type": "module",
|
|
@@ -53,7 +53,6 @@
|
|
|
53
53
|
"fast-glob": "^3.2.11",
|
|
54
54
|
"file-uri-to-path": "2.x.x",
|
|
55
55
|
"import-meta-resolve": "2",
|
|
56
|
-
"jasmine-expect": "5.0.0",
|
|
57
56
|
"less": "^4",
|
|
58
57
|
"live-server": "1.2.2",
|
|
59
58
|
"sinon": "17.0.1"
|
package/test/index.js
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import * as test from "node:test";
|
|
2
2
|
Object.assign(globalThis, test);
|
|
3
3
|
export {suite, test, timeout,} from "@testdeck/jest";
|
|
4
|
-
import { expect as expectBase, registerValidator, isEqual} from "earl";
|
|
5
|
-
import assert from "node:assert";
|
|
4
|
+
import { expect as expectBase, registerValidator, isEqual, formatCompact} from "earl";
|
|
6
5
|
// import * as globals from "@jest/globals";
|
|
7
6
|
export * as sinon from "sinon";
|
|
8
|
-
registerValidator("
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
registerValidator("toHaveProperty", (control, prop, value) => {
|
|
8
|
+
const actualInline = formatCompact(control.actual)
|
|
9
|
+
const actualValue = formatCompact(control.actual[prop])
|
|
10
|
+
control.assert({
|
|
11
|
+
success: control.actual[prop] === value,
|
|
12
|
+
reason: `The value ${actualInline}[${prop}] = ${actualValue} is not equal to ${value}, but is expected to be eqaul`,
|
|
13
|
+
negatedReason: `The value ${actualInline}[${prop}] = ${actualValue} is equal to ${value}, but is expected not to be eqaul`,
|
|
14
|
+
})
|
|
15
|
+
})
|
|
11
16
|
export const expect = expectBase;
|