Skip to content

Commit

Permalink
coverage back to 100
Browse files Browse the repository at this point in the history
  • Loading branch information
StoneCypher committed Aug 5, 2017
1 parent 4b46563 commit 1753f36
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
7 changes: 4 additions & 3 deletions dist/jssm.es5.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/jssm.es5.cjs.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/lib/index.html
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta charset='utf-8' />
<title>jssm 4.1.4 | Documentation</title>
<title>jssm 4.1.5 | Documentation</title>
<meta name='viewport' content='width=device-width,initial-scale=1'>
<link href='assets/bass.css' type='text/css' rel='stylesheet' />
<link href='assets/style.css' type='text/css' rel='stylesheet' />
Expand All @@ -14,7 +14,7 @@
<div class='fixed xs-hide fix-3 overflow-auto max-height-100'>
<div class='py1 px2'>
<h3 class='mb0 no-anchor'>jssm</h3>
<div class='mb1'><code>4.1.4</code></div>
<div class='mb1'><code>4.1.5</code></div>
<input
placeholder='Filter'
id='filter-input'
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "jssm",
"version": "4.1.4",
"version": "4.1.5",
"engines": {
"node": ">=6.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/js/jssm.js
Expand Up @@ -527,7 +527,7 @@ function sm<mNT, mDT>(template_strings : Array<string> /* , arguments */) : any
*/

return new Machine(compile(parse(template_strings.reduce(
(acc, val, idx) => `${acc}${idx? arguments[idx] : ''}${val}`
(acc, val, idx) => `${acc}${arguments[idx]}${val}` // arguments[0] is never loaded, so args doesn't need to be gated
))));

}
Expand Down
5 changes: 5 additions & 0 deletions src/js/tests/compile.js
Expand Up @@ -21,6 +21,11 @@ describe('compile/1', async _parse_it => {
it('doesn\'t throw', t => t.notThrows(() => { jssm.compile(jssm.parse(a_to_b_to_c_str)); }) );
});

describe('template tokens', async it => {
const a_through_e_token_str = `a->${'b'}->c->${'d'}->e;`;
it('doesn\'t throw', t => t.notThrows(() => { jssm.compile(jssm.parse(a_through_e_token_str)); }) );
});

});


Expand Down

0 comments on commit 1753f36

Please sign in to comment.