Skip to content

Instantly share code, notes, and snippets.

@Eyas
Created May 25, 2020 17:48
Show Gist options
  • Save Eyas/289bec33a9d1a789ab9af7f89412176b to your computer and use it in GitHub Desktop.
Save Eyas/289bec33a9d1a789ab9af7f89412176b to your computer and use it in GitHub Desktop.
expect(expression).toBeInstanceOf(FunctionCallAST);
const fn = expression as FunctionCallAST;
expect(fn.Parameters).toHaveLength(1);
expect(fn.Parameters[0]).toBeInstanceOf(BinaryExpressionAST);
const param = fn.Parameters[0] as BinaryExpressionAST;
// ... same for param.LHS and .RHS, etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment