Newer
Older
minerva / Userland / Libraries / LibJS / Tests / syntax / syntax-error-unary-expression-before-exponentiation.js
@minerva minerva on 13 Jul 347 bytes Initial commit
test("syntax error for an unary expression before exponentiation", () => {
    expect(`!5 ** 2`).not.toEval();
    expect(`~5 ** 2`).not.toEval();
    expect(`+5 ** 2`).not.toEval();
    expect(`-5 ** 2`).not.toEval();
    expect(`typeof 5 ** 2`).not.toEval();
    expect(`void 5 ** 2`).not.toEval();
    expect(`delete 5 ** 2`).not.toEval();
});