Skip to content

Commit

Permalink
beautify
Browse files Browse the repository at this point in the history
  • Loading branch information
Afsin Ustundag committed Nov 29, 2016
1 parent b68b838 commit e465285
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions test/test-examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,34 +265,33 @@ describe('examples', function () {
var template = {
dataKey: "product",
content: {
type: {constant: 'product'},
type: { constant: 'product' },
value: {}
}
};

var r0 = j2j.run(template, {product: "Ipad"});
var r0 = j2j.run(template, { product: "Ipad" });
console.log(r0);

expect(r0).to.deep.equal({type: 'product', value: 'Ipad'}
);
expect(r0).to.deep.equal({ type: 'product', value: 'Ipad' });
});

it('Value of current element array - empty object', function () {
var template = {
dataKey: "products",
content: {
type: {constant: 'product'},
type: { constant: 'product' },
value: {}
}
};

var r0 = j2j.run(template, {products: ["Ipad", "Ipod"]});
var r0 = j2j.run(template, { products: ["Ipad", "Ipod"] });
console.log(r0);

expect(r0).to.deep.equal(
[
{type: 'product', value: 'Ipad'},
{type: 'product', value: 'Ipod'}
{ type: 'product', value: 'Ipad' },
{ type: 'product', value: 'Ipod' }
]
);
});
Expand Down

0 comments on commit e465285

Please sign in to comment.