Skip to content

Commit 005b586

Browse files
committed
glayzzle#138 - impl a minimalistic test
1 parent 9c1f4a9 commit 005b586

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/tokenTests.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
var should = require("should");
2+
var parser = require("../src/index");
3+
4+
describe("Test tokens statements", function() {
5+
it('hello world', function() {
6+
var ast = parser.parseCode(
7+
'Hello <?= $world; ?>', {
8+
parser: {
9+
debug: false,
10+
extractTokens: true
11+
}
12+
});
13+
ast.tokens.length.should.be.exactly(7);
14+
ast.tokens[0][1].should.be.exactly('Hello ');
15+
});
16+
});

0 commit comments

Comments
 (0)