O'Reilly logo

Hands-On Full Stack Web Development with Aurelia by Erikson Haziz Murrugarra Sifuentes, Diego Jose Arguelles Rojas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Bootstrapping the component

We will need to create the component so that Jasmine will use it to apply the test. Apply the following changes in the info-box.spec.js file:

 import {StageComponent} from 'aurelia-testing'; import {bootstrap} from 'aurelia-bootstrapper'; describe('Info-Box', () => {   it('should render the username and topic', done => {     let component = StageComponent               .withResources('info-box')               .inView('<info-box></info-box>');     component     .create(bootstrap);       }); });

Before we bootstrap the component, it has to be created. We use the StageComponent object to instantiate an Aurelia component; we specify the component by passing its name as a param of the withResources function. Lastly, we specify a view using the <info-box> element ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required