June 2018
Intermediate to advanced
348 pages
8h 19m
English
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 ...
Read now
Unlock full access