-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Igor Alpert
committed
Jun 23, 2018
1 parent
b1689a7
commit f735716
Showing
2 changed files
with
26 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { sourceAST } from './helpers' | ||
|
||
describe('Location tests', () => { | ||
test.only('Should identify location of print statement', () => { | ||
expect(() => { | ||
const ast = sourceAST(`print a, b, c`, 'BlockStatement') | ||
const ast2 = sourceAST(`? a, b, c`, 'BlockStatement') | ||
|
||
expect(ast.range).toEqual([0, 13]) | ||
expect(ast2.range).toEqual([0, 9]) | ||
}).not.toThrow() | ||
}) | ||
}) |