February 2019
Beginner
694 pages
18h 4m
English
Our testing thus far has focused on the models that we will be using in our application, and the ItemView view, which is responsible for rendering a single button. We now need to extend our tests to the ItemCollectionView class, to ensure that this class renders elements correctly to the DOM, and that it can work with our form correctly. Let's start by setting up our test suite as follows:
describe("views.spec.ts : ItemCollectionView tests", () => { let renderedHtml: JQuery<HTMLElement>; let submitSpy: jasmine.Spy; let itemCollectionView: ItemCollectionView; beforeEach(() => { jasmine.getFixtures().fixturesPath = "./"; loadFixtures("views.spec.html"); let itemCollection = new ItemCollection(ClickableItems); let collectionViewModel ...Read now
Unlock full access