Skip to content

Commit

Permalink
coverage improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
StoneCypher committed Aug 5, 2017
1 parent 8730333 commit 4b46563
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 6 deletions.
2 changes: 1 addition & 1 deletion 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.3 | Documentation</title>
<title>jssm 4.1.4 | 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.3</code></div>
<div class='mb1'><code>4.1.4</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.3",
"version": "4.1.4",
"engines": {
"node": ">=6.0.0"
},
Expand Down
17 changes: 17 additions & 0 deletions src/js/tests/compile.js
Expand Up @@ -16,6 +16,23 @@ describe('compile/1', async _parse_it => {
it('doesn\'t throw', t => t.notThrows(() => { jssm.compile(jssm.parse(a_to_b_str)); }) );
});

describe('a->b->c;', async it => {
const a_to_b_to_c_str = `a->b->c;`;
it('doesn\'t throw', t => t.notThrows(() => { jssm.compile(jssm.parse(a_to_b_to_c_str)); }) );
});

});





describe('error catchery', async _parse_it => {

describe('unknown rule', async it => {
it('throws', t => t.throws( () => { jssm.compile( [{"key":"FAKE_RULE","from":"a","se":{"kind":"->","to":"b"}}] ); } ))
});

});

// stochable
10 changes: 9 additions & 1 deletion src/js/tests/sm_tag.js
Expand Up @@ -12,10 +12,18 @@ const jssm = require('../../../build/jssm.es5.js'),

describe('sm``', async _parse_it => {

describe('sm`a->b;`', async it => {
describe('simple sm`a->b;`', async it => {
it('doesn\'t throw', t => t.notThrows(() => { const foo = sm`a -> b;`; }) );
});

describe('long and chain sm`a->b;c->d;e->f->g;h->i;`', async it => {
it('doesn\'t throw', t => t.notThrows(() => { const foo = sm`a->b;c->d;e->f->g;h->i;`; }) );
});

describe('template tags`', async it => {
it('doesn\'t throw', t => t.notThrows(() => { const bar = 'c->d', baz = 'b->h->i;f->h', foo = sm`a->b;${bar};e->f->g;${baz};`; }) );
});

});

// stochable

0 comments on commit 4b46563

Please sign in to comment.