Skip to content

Commit

Permalink
Fix broken test: eachOf
Browse files Browse the repository at this point in the history
It appears that these tests fell behind the docs: the current docs use
"in" instead of "of", along with some other subtleties. The directory
itself should probably be renamed to "eachIn", too, but I'm just trying
to get rid of all this red in the tests.
  • Loading branch information
brewingcode committed Feb 7, 2020
1 parent 201b9c7 commit c6c72ae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/pug/test/eachOf/index.test.js
Expand Up @@ -35,7 +35,7 @@ describe('Proper Usage', () => {
const html = pug.renderFile(
__dirname + '/passing/brackets.pug',
{
users: new Map([['a', 'b'], ['foo', 'bar']])
users: { a:'b', foo:'bar' }
}
)
expect(html).toMatchSnapshot();
Expand All @@ -44,7 +44,7 @@ describe('Proper Usage', () => {
const html = pug.renderFile(
__dirname + '/passing/no-brackets.pug',
{
users: new Map([['a', 'b'], ['foo', 'bar']])
users: [ ['a', 'b'], ['foo', 'bar'] ]
}
)
expect(html).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion packages/pug/test/eachOf/passing/brackets.pug
@@ -1,3 +1,3 @@
each [key, val] of users
each val, key in users
li= key
li= val
2 changes: 1 addition & 1 deletion packages/pug/test/eachOf/passing/no-brackets.pug
@@ -1,3 +1,3 @@
each data of users
each data in users
li= data[0]
li= data[1]

0 comments on commit c6c72ae

Please sign in to comment.