Browse Source

LibJS: Expect this.target to have typeof number in toBeCloseTo

The previous expectation of typeof value was inconsistent with the
expect message.
Sam Kravitz 2 năm trước cách đây
mục cha
commit
73c8650ea0
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      Userland/Libraries/LibJS/Tests/test-common.js

+ 1 - 1
Userland/Libraries/LibJS/Tests/test-common.js

@@ -90,7 +90,7 @@ class ExpectationError extends Error {
         toBeCloseTo(value) {
             this.__expect(
                 typeof this.target === "number",
-                () => `toBeCloseTo: expected target of type number, got ${typeof value}`
+                () => `toBeCloseTo: expected target of type number, got ${typeof this.target}`
             );
             this.__expect(
                 typeof value === "number",