Skip to content

Commit

Permalink
update error message
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Nov 7, 2022
1 parent f643f17 commit 22ec030
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 96 deletions.
@@ -1,27 +1,27 @@
expect(() => class { static #p = #p in 0 }).toThrowError(`right-hand side of 'in' should be an object, got number`);
expect(() => class { static #p = #p in "" }).toThrowError(`right-hand side of 'in' should be an object, got string`);
expect(() => class { static #p = #p in true }).toThrowError(`right-hand side of 'in' should be an object, got boolean`);
expect(() => class { static #p = #p in void 0 }).toThrowError(`right-hand side of 'in' should be an object, got undefined`);
expect(() => class { static #p = #p in Symbol.iterator }).toThrowError(`right-hand side of 'in' should be an object, got symbol`);
expect(() => class { static #p = #p in 0n }).toThrowError(`right-hand side of 'in' should be an object, got bigint`);
expect(() => class { static #p = #p in 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p = #p in "" }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p = #p in true }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p = #p in void 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p = #p in Symbol.iterator }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p = #p in 0n }).toThrowError("Cannot use 'in' operator to search for '0'");

expect(() => class { static #p() {}; static q = #p in 0 }).toThrowError(`right-hand side of 'in' should be an object, got number`);
expect(() => class { static #p() {}; static q = #p in "" }).toThrowError(`right-hand side of 'in' should be an object, got string`);
expect(() => class { static #p() {}; static q = #p in true }).toThrowError(`right-hand side of 'in' should be an object, got boolean`);
expect(() => class { static #p() {}; static q = #p in void 0 }).toThrowError(`right-hand side of 'in' should be an object, got undefined`);
expect(() => class { static #p() {}; static q = #p in Symbol.iterator }).toThrowError(`right-hand side of 'in' should be an object, got symbol`);
expect(() => class { static #p() {}; static q = #p in 0n }).toThrowError(`right-hand side of 'in' should be an object, got bigint`);
expect(() => class { static #p() {}; static q = #p in 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p() {}; static q = #p in "" }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p() {}; static q = #p in true }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p() {}; static q = #p in void 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p() {}; static q = #p in Symbol.iterator }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p() {}; static q = #p in 0n }).toThrowError("Cannot use 'in' operator to search for '0'");

expect(() => new class { #p = #p in 0 }).toThrowError(`right-hand side of 'in' should be an object, got number`);
expect(() => new class { #p = #p in "" }).toThrowError(`right-hand side of 'in' should be an object, got string`);
expect(() => new class { #p = #p in true }).toThrowError(`right-hand side of 'in' should be an object, got boolean`);
expect(() => new class { #p = #p in void 0 }).toThrowError(`right-hand side of 'in' should be an object, got undefined`);
expect(() => new class { #p = #p in Symbol.iterator }).toThrowError(`right-hand side of 'in' should be an object, got symbol`);
expect(() => new class { #p = #p in 0n }).toThrowError(`right-hand side of 'in' should be an object, got bigint`);
expect(() => new class { #p = #p in 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p = #p in "" }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p = #p in true }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p = #p in void 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p = #p in Symbol.iterator }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p = #p in 0n }).toThrowError("Cannot use 'in' operator to search for '0'");

expect(() => new class { #p() {}; q = #p in 0 }).toThrowError(`right-hand side of 'in' should be an object, got number`);
expect(() => new class { #p() {}; q = #p in "" }).toThrowError(`right-hand side of 'in' should be an object, got string`);
expect(() => new class { #p() {}; q = #p in true }).toThrowError(`right-hand side of 'in' should be an object, got boolean`);
expect(() => new class { #p() {}; q = #p in void 0 }).toThrowError(`right-hand side of 'in' should be an object, got undefined`);
expect(() => new class { #p() {}; q = #p in Symbol.iterator }).toThrowError(`right-hand side of 'in' should be an object, got symbol`);
expect(() => new class { #p() {}; q = #p in 0n }).toThrowError(`right-hand side of 'in' should be an object, got bigint`);
expect(() => new class { #p() {}; q = #p in 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p() {}; q = #p in "" }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p() {}; q = #p in true }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p() {}; q = #p in void 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p() {}; q = #p in Symbol.iterator }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p() {}; q = #p in 0n }).toThrowError("Cannot use 'in' operator to search for '0'");
@@ -1,27 +1,27 @@
expect(() => class { static #p = #p in 0 }).toThrowError(`right-hand side of 'in' should be an object, got number`);
expect(() => class { static #p = #p in "" }).toThrowError(`right-hand side of 'in' should be an object, got string`);
expect(() => class { static #p = #p in true }).toThrowError(`right-hand side of 'in' should be an object, got boolean`);
expect(() => class { static #p = #p in void 0 }).toThrowError(`right-hand side of 'in' should be an object, got undefined`);
expect(() => class { static #p = #p in Symbol.iterator }).toThrowError(`right-hand side of 'in' should be an object, got symbol`);
expect(() => class { static #p = #p in 0n }).toThrowError(`right-hand side of 'in' should be an object, got bigint`);
expect(() => class { static #p = #p in 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p = #p in "" }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p = #p in true }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p = #p in void 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p = #p in Symbol.iterator }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p = #p in 0n }).toThrowError("Cannot use 'in' operator to search for '0'");

expect(() => class { static #p() {}; static q = #p in 0 }).toThrowError(`right-hand side of 'in' should be an object, got number`);
expect(() => class { static #p() {}; static q = #p in "" }).toThrowError(`right-hand side of 'in' should be an object, got string`);
expect(() => class { static #p() {}; static q = #p in true }).toThrowError(`right-hand side of 'in' should be an object, got boolean`);
expect(() => class { static #p() {}; static q = #p in void 0 }).toThrowError(`right-hand side of 'in' should be an object, got undefined`);
expect(() => class { static #p() {}; static q = #p in Symbol.iterator }).toThrowError(`right-hand side of 'in' should be an object, got symbol`);
expect(() => class { static #p() {}; static q = #p in 0n }).toThrowError(`right-hand side of 'in' should be an object, got bigint`);
expect(() => class { static #p() {}; static q = #p in 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p() {}; static q = #p in "" }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p() {}; static q = #p in true }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p() {}; static q = #p in void 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p() {}; static q = #p in Symbol.iterator }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p() {}; static q = #p in 0n }).toThrowError("Cannot use 'in' operator to search for '0'");

expect(() => new class { #p = #p in 0 }).toThrowError(`right-hand side of 'in' should be an object, got number`);
expect(() => new class { #p = #p in "" }).toThrowError(`right-hand side of 'in' should be an object, got string`);
expect(() => new class { #p = #p in true }).toThrowError(`right-hand side of 'in' should be an object, got boolean`);
expect(() => new class { #p = #p in void 0 }).toThrowError(`right-hand side of 'in' should be an object, got undefined`);
expect(() => new class { #p = #p in Symbol.iterator }).toThrowError(`right-hand side of 'in' should be an object, got symbol`);
expect(() => new class { #p = #p in 0n }).toThrowError(`right-hand side of 'in' should be an object, got bigint`);
expect(() => new class { #p = #p in 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p = #p in "" }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p = #p in true }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p = #p in void 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p = #p in Symbol.iterator }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p = #p in 0n }).toThrowError("Cannot use 'in' operator to search for '0'");

expect(() => new class { #p() {}; q = #p in 0 }).toThrowError(`right-hand side of 'in' should be an object, got number`);
expect(() => new class { #p() {}; q = #p in "" }).toThrowError(`right-hand side of 'in' should be an object, got string`);
expect(() => new class { #p() {}; q = #p in true }).toThrowError(`right-hand side of 'in' should be an object, got boolean`);
expect(() => new class { #p() {}; q = #p in void 0 }).toThrowError(`right-hand side of 'in' should be an object, got undefined`);
expect(() => new class { #p() {}; q = #p in Symbol.iterator }).toThrowError(`right-hand side of 'in' should be an object, got symbol`);
expect(() => new class { #p() {}; q = #p in 0n }).toThrowError(`right-hand side of 'in' should be an object, got bigint`);
expect(() => new class { #p() {}; q = #p in 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p() {}; q = #p in "" }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p() {}; q = #p in true }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p() {}; q = #p in void 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p() {}; q = #p in Symbol.iterator }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p() {}; q = #p in 0n }).toThrowError("Cannot use 'in' operator to search for '0'");
@@ -1,27 +1,27 @@
expect(() => class { static #p = #p in 0 }).toThrowError(`right-hand side of 'in' should be an object, got number`);
expect(() => class { static #p = #p in "" }).toThrowError(`right-hand side of 'in' should be an object, got string`);
expect(() => class { static #p = #p in true }).toThrowError(`right-hand side of 'in' should be an object, got boolean`);
expect(() => class { static #p = #p in void 0 }).toThrowError(`right-hand side of 'in' should be an object, got undefined`);
expect(() => class { static #p = #p in Symbol.iterator }).toThrowError(`right-hand side of 'in' should be an object, got symbol`);
expect(() => class { static #p = #p in 0n }).toThrowError(`right-hand side of 'in' should be an object, got bigint`);
expect(() => class { static #p = #p in 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p = #p in "" }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p = #p in true }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p = #p in void 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p = #p in Symbol.iterator }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p = #p in 0n }).toThrowError("Cannot use 'in' operator to search for '0'");

expect(() => class { static #p() {}; static q = #p in 0 }).toThrowError(`right-hand side of 'in' should be an object, got number`);
expect(() => class { static #p() {}; static q = #p in "" }).toThrowError(`right-hand side of 'in' should be an object, got string`);
expect(() => class { static #p() {}; static q = #p in true }).toThrowError(`right-hand side of 'in' should be an object, got boolean`);
expect(() => class { static #p() {}; static q = #p in void 0 }).toThrowError(`right-hand side of 'in' should be an object, got undefined`);
expect(() => class { static #p() {}; static q = #p in Symbol.iterator }).toThrowError(`right-hand side of 'in' should be an object, got symbol`);
expect(() => class { static #p() {}; static q = #p in 0n }).toThrowError(`right-hand side of 'in' should be an object, got bigint`);
expect(() => class { static #p() {}; static q = #p in 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p() {}; static q = #p in "" }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p() {}; static q = #p in true }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p() {}; static q = #p in void 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p() {}; static q = #p in Symbol.iterator }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => class { static #p() {}; static q = #p in 0n }).toThrowError("Cannot use 'in' operator to search for '0'");

expect(() => new class { #p = #p in 0 }).toThrowError(`right-hand side of 'in' should be an object, got number`);
expect(() => new class { #p = #p in "" }).toThrowError(`right-hand side of 'in' should be an object, got string`);
expect(() => new class { #p = #p in true }).toThrowError(`right-hand side of 'in' should be an object, got boolean`);
expect(() => new class { #p = #p in void 0 }).toThrowError(`right-hand side of 'in' should be an object, got undefined`);
expect(() => new class { #p = #p in Symbol.iterator }).toThrowError(`right-hand side of 'in' should be an object, got symbol`);
expect(() => new class { #p = #p in 0n }).toThrowError(`right-hand side of 'in' should be an object, got bigint`);
expect(() => new class { #p = #p in 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p = #p in "" }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p = #p in true }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p = #p in void 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p = #p in Symbol.iterator }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p = #p in 0n }).toThrowError("Cannot use 'in' operator to search for '0'");

expect(() => new class { #p() {}; q = #p in 0 }).toThrowError(`right-hand side of 'in' should be an object, got number`);
expect(() => new class { #p() {}; q = #p in "" }).toThrowError(`right-hand side of 'in' should be an object, got string`);
expect(() => new class { #p() {}; q = #p in true }).toThrowError(`right-hand side of 'in' should be an object, got boolean`);
expect(() => new class { #p() {}; q = #p in void 0 }).toThrowError(`right-hand side of 'in' should be an object, got undefined`);
expect(() => new class { #p() {}; q = #p in Symbol.iterator }).toThrowError(`right-hand side of 'in' should be an object, got symbol`);
expect(() => new class { #p() {}; q = #p in 0n }).toThrowError(`right-hand side of 'in' should be an object, got bigint`);
expect(() => new class { #p() {}; q = #p in 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p() {}; q = #p in "" }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p() {}; q = #p in true }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p() {}; q = #p in void 0 }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p() {}; q = #p in Symbol.iterator }).toThrowError("Cannot use 'in' operator to search for '0'");
expect(() => new class { #p() {}; q = #p in 0n }).toThrowError("Cannot use 'in' operator to search for '0'");

0 comments on commit 22ec030

Please sign in to comment.