Skip to Main Content
Mastering TypeScript 3 - Third Edition
book

Mastering TypeScript 3 - Third Edition

by Nathan Rozentals
February 2019
Beginner content levelBeginner
694 pages
18h 4m
English
Packt Publishing
Content preview from Mastering TypeScript 3 - Third Edition

Rendering tests

Our next round of tests will cover rendering elements to the DOM. Aurelia provides a set of helper classes, similar to Jamine's setFixture functionality, in order to attach HTML to the DOM, and render views using these temporary DOM elements. Our test suite, therefore, needs to include the following two import statements at the top of the file:

import {StageComponent} from 'aurelia-testing'; 
import {bootstrap} from 'aurelia-bootstrapper'; 

These import statements include a class named StageComponent, and a function named bootstrap. The StageComponent class is the helper utility that Aurelia provides in order to house an instance of our item under test, which in our case is an instance of the App class. The bootstrap function ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

The TypeScript Workshop

The TypeScript Workshop

Ben Grynhaus, Jordan Hudgens, Rayon Hunte, Matt Morgan, Wekoslav Stefanovski

Publisher Resources

ISBN: 9781789536706Supplemental Content