syntax-error-unary-expression-before-exponentiation.js 347 B

123456789
  1. test("syntax error for an unary expression before exponentiation", () => {
  2. expect(`!5 ** 2`).not.toEval();
  3. expect(`~5 ** 2`).not.toEval();
  4. expect(`+5 ** 2`).not.toEval();
  5. expect(`-5 ** 2`).not.toEval();
  6. expect(`typeof 5 ** 2`).not.toEval();
  7. expect(`void 5 ** 2`).not.toEval();
  8. expect(`delete 5 ** 2`).not.toEval();
  9. });