js-slang
Version:
Javascript-based implementations of Source, written in Typescript
53 lines (49 loc) • 966 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("./utils");
describe('Regression tests for py-slang', () => {
test('Issue #2', () => {
const text = `
def foo():
pass
pass
`;
(0, utils_1.toEstreeAST)(text);
});
test('Issue #5', () => {
const text = `
print("hi")
print("world")
`;
(0, utils_1.toEstreeAST)(text);
});
test('Issue #3', () => {
const text = `
def foo(
a,
b
):
pass
pass
`;
(0, utils_1.toEstreeAST)(text);
});
test('Issue #9', () => {
const text = `
add_one = lambda : None
add_one = lambda : True
add_one = lambda : False
`;
(0, utils_1.toEstreeAST)(text);
});
test('Issue #35', () => {
const text = `
def f():
return g()
def g():
return 3
`;
(0, utils_1.toEstreeAstAndResolve)(text);
});
});
//# sourceMappingURL=regression.test.js.map
;