Skip to content

Commit

Permalink
Added failing test (Array duck typing not supported by each)
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchg authored and tj committed Feb 2, 2011
1 parent 9a1e1dc commit 6da416a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/jade.test.js
Expand Up @@ -725,6 +725,21 @@ module.exports = {
'<li>three</li>'
].join('');

assert.equal(html, render(str));

// Any enumerable (length property)
var str = [
'- var jQuery = { length: 3, 0: 1, 1: 2, 2: 3 };',
'- each item in jQuery',
' li= item'
].join('\n');

var html = [
'<li>1</li>',
'<li>2</li>',
'<li>3</li>'
].join('');

assert.equal(html, render(str));

// Empty array
Expand Down

0 comments on commit 6da416a

Please sign in to comment.