Skip to content

Commit

Permalink
Merge 4e5f34b into 4a29cf5
Browse files Browse the repository at this point in the history
  • Loading branch information
noahlange committed Apr 25, 2018
2 parents 4a29cf5 + 4e5f34b commit 4988f0a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/superjucks/src/tests/nodes/Raw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@ test('should parse multiple multiline raw blocks', async t => {
const foo = await run(`{% raw %}${ str }{% endraw %}`, { foo: 1 });
t.is(foo, '{{ var }}\n1\n{{ var }}');
});

test('compilation should be a no-op', async t => {
t.is(new Nodes.Raw(1, 2, {}).compile(null, null), undefined);
});
5 changes: 5 additions & 0 deletions packages/superjucks/src/tests/nodes/set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,8 @@ test('should compile variable sets', async t => {
const res = await run('{% set foo = \'bar\' %}{{ foo }}');
t.is(res, 'bar');
});

test('should compile block sets', async t => {
const res = await run('{% set foo %}bar{% endset %}{{ foo }}');
t.is(res, 'bar');
});

0 comments on commit 4988f0a

Please sign in to comment.