Permalink
Browse files

fixed a test since "if" is already supported

  • Loading branch information...
1 parent efe4874 commit b3f4c1d83fe4345b5e958308095b21f89b917a25 @tj tj committed Aug 26, 2011
Showing with 4 additions and 12 deletions.
  1. +4 −12 test/filters.test.js
View
@@ -25,21 +25,13 @@ function Visitor(node) {
Visitor.prototype.__proto__ = Compiler.prototype;
Visitor.prototype.visit = function(node){
- if (node.name != 'else') this.line(node);
+ if (node.name != 'or') this.line(node);
this.visitNode(node);
};
Visitor.prototype.visitTag = function(node){
switch (node.name) {
- case 'if':
- // First text -> line
- var condition = node.text[0]
- , block = node.block;
- node = new nodes.Code('if (' + condition + ')');
- node.block = block;
- this.visit(node);
- break;
- case 'else':
+ case 'or':
var block = node.block;
node = new nodes.Code('else');
node.block = block;
@@ -130,10 +122,10 @@ module.exports = {
'conditionals:',
' if false',
' | oh noes',
- ' else',
+ ' or',
' if null == false',
' p doh',
- ' else',
+ ' or',
' p amazing!'
].join('\n');

0 comments on commit b3f4c1d

Please sign in to comment.