@bigcommerce/stencil-paper
Advanced tools
Comparing version 2.0.13 to 2.0.14
@@ -0,1 +1,6 @@ | ||
## Unreleased | ||
## 2.0.14 (2019-06-28) | ||
-- Fix for helper to allow for one iteration | ||
## 2.0.13 (2019-05-24) | ||
@@ -2,0 +7,0 @@ -- Change default behavior of {{getFontsCollection}} to use font-display: swap for Google Fonts and allow configuration |
@@ -28,3 +28,3 @@ 'use strict'; | ||
if (to <= from) { | ||
if (to < from) { | ||
return; | ||
@@ -31,0 +31,0 @@ } |
{ | ||
"name": "@bigcommerce/stencil-paper", | ||
"version": "2.0.13", | ||
"version": "2.0.14", | ||
"description": "A stencil plugin to register partials and helpers from handlebars and returns the compiled version for the stencil platform.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -16,3 +16,19 @@ var Code = require('code'), | ||
var context = {name: 'Joe'}; | ||
it('should iterate once', function(done) { | ||
expect(c('{{#for 1 this}}{{$index}}:{{name}} {{/for}}', context)) | ||
.to.contain('1:Joe'); | ||
expect(c('{{#for 1 1 this}}{{$index}}:{{name}} {{/for}}', context)) | ||
.to.contain('1:Joe'); | ||
expect(c('{{#for 0 0 this}}{{$index}}:{{name}} {{/for}}', context)) | ||
.to.contain('0:Joe'); | ||
expect(c('{{#for 1000 1000 this}}{{$index}}:{{name}} {{/for}}', context)) | ||
.to.contain('1000:Joe'); | ||
done(); | ||
}) | ||
it('should itarate 10 times', function(done) { | ||
@@ -19,0 +35,0 @@ |
148337
3753