We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 965f86d commit 1e18f48Copy full SHA for 1e18f48
test/ifTests.js
@@ -102,4 +102,19 @@ describe('Test IF statements', function() {
102
ast.children[1].alternate.kind.should.be.exactly('block');
103
});
104
105
+ describe('Issue #84', function () {
106
+ var ast = parser.parseCode([
107
+ '<?php if (true): ?>',
108
+ '<?php else: ?>',
109
+ '<?php endif; ?>'
110
+ ].join('\n'), {
111
+ parser: { debug: false }
112
+ });
113
+ it('if block should have zero children', function() {
114
+ ast.children[0].body.children.length.should.be.exactly(0);
115
116
+ it('else block should have zero children', function() {
117
+ ast.children[0].alternate.children.length.should.be.exactly(0);
118
119
120
0 commit comments