* Better tdz tests - Use jest's expect.toThrow/expect.not.toThrow - Add input/output tests * Fix basic tdz (a = 2; let a) Fixes #6848 * Make _guessExecutionStatusRelativeTo more robust * Add tests * Return less "unkown" execution status * "function" execution status does not exist * Fix recursive functions * Update helper version * "finally" blocks are always executed * Typo
18 lines
239 B
JavaScript
18 lines
239 B
JavaScript
expect(() => {
|
|
function f() {
|
|
return function() { x };
|
|
}
|
|
let g = f();
|
|
let x;
|
|
g();
|
|
}).not.toThrow();
|
|
|
|
expect(() => {
|
|
function f() {
|
|
return function() { x };
|
|
}
|
|
let g = f();
|
|
g();
|
|
let x;
|
|
}).toThrow(ReferenceError);
|