Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Test case for flatiron/plates#59

  • Loading branch information...
commit ccd9bbd5b5c8469923b845f8492d51990ab01776 1 parent 8ce1fe5
Dougal Campbell authored
7 test/api-test.js
@@ -215,6 +215,13 @@ vows.describe('merge data into markup').addBatch({
215 215
216 216 return common.createTest('test-20', map);
217 217 }()
  218 + ),
  219 +
  220 + '(21) Keep your place after handling nested objects': (
  221 +
  222 + function() {
  223 + return common.createTest('test-21');
  224 + }()
218 225 )
219 226
220 227 }
11 test/fixtures/test-21.html
... ... @@ -0,0 +1,11 @@
  1 +<div id="entries">
  2 + <div class="entry">
  3 + <div class="created"></div>
  4 + <div class="user">
  5 + <div class="name"></div>
  6 + <div class="city"></div>
  7 + <div class="state"></div>
  8 + </div>
  9 + <div class="custid"></div>
  10 + </div>
  11 +</div>
31 test/fixtures/test-21.json
... ... @@ -0,0 +1,31 @@
  1 +{
  2 + "entries": [
  3 + {
  4 + "custid": 10101,
  5 + "created": "2001-01-01",
  6 + "user": {
  7 + "name": "John Q. User",
  8 + "city": "Atlanta",
  9 + "state": "GA"
  10 + }
  11 + },
  12 + {
  13 + "custid": 20202,
  14 + "created": "2002-02-02",
  15 + "user": {
  16 + "name": "Jane Q. User",
  17 + "city": "Mobile",
  18 + "state": "AL"
  19 + }
  20 + },
  21 + {
  22 + "custid": 30303,
  23 + "created": "2003-0303",
  24 + "user": {
  25 + "name": "Professor X",
  26 + "city": "Menlo",
  27 + "state": "CA"
  28 + }
  29 + }
  30 + ]
  31 +}
29 test/fixtures/test-21.out
... ... @@ -0,0 +1,29 @@
  1 +<div id="entries">
  2 + <div class="entry">
  3 + <div class="created">2001-01-01</div>
  4 + <div class="user">
  5 + <div class="name">John Q. User</div>
  6 + <div class="city">Atlanta</div>
  7 + <div class="state">GA</div>
  8 + </div>
  9 + <div class="custid">10101</div>
  10 + </div>
  11 + <div class="entry">
  12 + <div class="created">2002-02-02</div>
  13 + <div class="user">
  14 + <div class="name">Jane Q. User</div>
  15 + <div class="city">Mobile</div>
  16 + <div class="state">AL</div>
  17 + </div>
  18 + <div class="custid">20202</div>
  19 + </div>
  20 + <div class="entry">
  21 + <div class="created">2003-0303</div>
  22 + <div class="user">
  23 + <div class="name">Professor X</div>
  24 + <div class="city">Menlo</div>
  25 + <div class="state">CA</div>
  26 + </div>
  27 + <div class="custid">30303</div>
  28 + </div>
  29 +</div>

0 comments on commit ccd9bbd

Please sign in to comment.
Something went wrong with that request. Please try again.