Skip to content

Commit

Permalink
Merge pull request #478 from Autre31415/one-line-if-bug
Browse files Browse the repository at this point in the history
Add failing test for one-line if resolving as true when value is false
  • Loading branch information
kethinov committed Mar 23, 2021
2 parents 6a47dde + 7c583d8 commit 8a699ff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/conditionals.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@ describe('Conditionals', function () {
done()
})

it.skip('should evaluate one line if "if-somethingFalse" as false (conditionals/oneLineIfBooleanValue.html)', function (done) {
assert.equalIgnoreSpaces(teddy.render('conditionals/oneLineIfBooleanValue.html', model), '<p></p>')
done()
})

it('should evaluate one line ifs in loops examining the object member\'s value correctly (conditionals/oneLineInLoop.html)', function (done) {
assert.equalIgnoreSpaces(teddy.render('conditionals/oneLineInLoop.html', model), '<p class=\'something-is-present\'>guy</p><p class=\'something-is-present\'>girl</p><p class=\'something-is-present\'>landscape</p><p class=\'something-is-not-present\'>guy</p><p class=\'something-is-present\'>girl</p><p class=\'something-is-not-present\'>landscape</p>')
done()
Expand Down
5 changes: 5 additions & 0 deletions test/templates/conditionals/oneLineIfBooleanValue.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{!
should evaluate one line if as false when value being checked is false
!}

<p if-somethingFalse true="class='somethingFalse-is-true'"></p>

0 comments on commit 8a699ff

Please sign in to comment.