acquit
acquit copied to clipboard
Latest version (1.1.0) fails to parse the JS Spread syntax
(Opening as a separate issue, from #22 , for ease of tracking)
The latest version fails when trying to parse tests (it blocks) which use the JS "spread" operator/syntax
const obj = {
name: "My Object"
};
it("should parse spread syntax", async () => {
const newObj = { key: { ...obj, newKey: "newValue" } };
// TEST CODE
});
Error: Line 165: Unexpected token ...
If I comment out the lines which contain "...", then it'll parse the full test file.
It looks like ESprima is to blame, so I've raised a bug with them.
The workaround for now, is to revert to using .concat() instead of ....