- feat 1
- feat 2
- feat 1
| // Usage : | |
| // | |
| // 1 - Load the real module | |
| // ============================ | |
| // beforeEach(module('app', 'partials/my-directive.html')); | |
| // | |
| // 2 - Create the mock constructor function and call module(mockDirectiveController(...)) | |
| // ============================ | |
| // beforeEach(function () { | |
| // function CtrlMock() { |
this:
someting
.then(function(){
});
is turned into:
| import {Container, singleton} from 'aurelia-dependency-injection'; | |
| describe('DI scoped singletong', () => { | |
| @singleton(true) | |
| class Foo{} | |
| it('should work the way I think :)', () => { | |
| let rootContainer = new Container(); |
| <template> | |
| <h1>${message}</h1> | |
| </template> |
| <template> | |
| <h1>${message}</h1> | |
| </template> |
| <template> | |
| <div> | |
| foo.value <input type="text" value.bind="foo.value"> | |
| </div> | |
| <div> | |
| bar.value <input type="text" value.bind="bar.value"> | |
| </div> |
| <template> | |
| <require from="./e1"></require> | |
| <div repeat.for="i of 200" style="display:inline-block"> | |
| <e1 value.bind="i"></e1> | |
| </div> | |
| <div repeat.for="i of 200" style="display:inline-block"> | |
| <compose view-model="./c1" containerless></compose> | |
| </div> |
| <template> | |
| <require from="./e1"></require> | |
| <e1 value.bind="'initial'"></e1> | |
| </template> | |
| <template> | |
| <require from="./e1"></require> | |
| <e1 value.bind="'initial'"></e1> | |
| </template> | |