Skip to content

Commit

Permalink
Remove use of deprecated - each syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyGu committed Sep 13, 2015
1 parent 7f5e6d2 commit 729fe17
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions examples/mixins/profile.jade
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

mixin pets(pets)
ul.pets
- each pet in pets
each pet in pets
li= pet

mixin profile(user)
.user
h2= user.name
mixin pets(user.pets)
mixin pets(user.pets)
18 changes: 9 additions & 9 deletions test/jade.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -692,11 +692,11 @@ describe('jade', function(){
assert.equal(html, jade.render(str));
});

it('should support - each', function(){
it('should support each', function(){
// Array
var str = [
'- var items = ["one", "two", "three"];',
'- each item in items',
'each item in items',
' li= item'
].join('\n');

Expand All @@ -711,7 +711,7 @@ describe('jade', function(){
// Any enumerable (length property)
var str = [
'- var jQuery = { length: 3, 0: 1, 1: 2, 2: 3 };',
'- each item in jQuery',
'each item in jQuery',
' li= item'
].join('\n');

Expand All @@ -726,7 +726,7 @@ describe('jade', function(){
// Empty array
var str = [
'- var items = [];',
'- each item in items',
'each item in items',
' li= item'
].join('\n');

Expand All @@ -735,7 +735,7 @@ describe('jade', function(){
// Object
var str = [
'- var obj = { foo: "bar", baz: "raz" };',
'- each val in obj',
'each val in obj',
' li= val'
].join('\n');

Expand All @@ -749,7 +749,7 @@ describe('jade', function(){
// Complex
var str = [
'- var obj = { foo: "bar", baz: "raz" };',
'- each key in Object.keys(obj)',
'each key in Object.keys(obj)',
' li= key'
].join('\n');

Expand All @@ -763,7 +763,7 @@ describe('jade', function(){
// Keys
var str = [
'- var obj = { foo: "bar", baz: "raz" };',
'- each val, key in obj',
'each val, key in obj',
' li #{key}: #{val}'
].join('\n');

Expand All @@ -777,8 +777,8 @@ describe('jade', function(){
// Nested
var str = [
'- var users = [{ name: "tj" }]',
'- each user in users',
' - each val, key in user',
'each user in users',
' each val, key in user',
' li #{key} #{val}',
].join('\n');

Expand Down

0 comments on commit 729fe17

Please sign in to comment.