Skip to content

Commit

Permalink
Migration: js() to addJs() tests added
Browse files Browse the repository at this point in the history
  • Loading branch information
miripiruni committed Jun 2, 2017
1 parent f869eff commit 908c67d
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
block('test').js()(function() {
// TODO: ololo
var js = this.ctx.js;

js = { data: 'lol' };

return js;
});

block('test').js()(true);
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
block('test').addJs()(function() {
// TODO: ololo
var js = this.ctx.js;

js = { data: 'lol' };

return js;
});

block('test').addJs()(true);
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ block('b')(

content()('test')
);

block('b')(
js()(true),

content()('test')
);
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ block('b')(

content()('test')
);

block('b')(
addJs()(true),

content()('test')
);
1 change: 1 addition & 0 deletions migration/lib/transformers/__tests__/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ defineTest(__dirname, '8-mix-to-addmix', null, '8-mix-to-addmix-1');
defineTest(__dirname, '8-mix-to-addmix', null, '8-mix-to-addmix-2');
defineTest(__dirname, '8-js-to-addjs', null, '8-js-to-addjs-1');
defineTest(__dirname, '8-js-to-addjs', null, '8-js-to-addjs-2');
defineTest(__dirname, '8-chain-js-to-chain-addjs', null, '8-chain-js-to-chain-addjs-1');

0 comments on commit 908c67d

Please sign in to comment.