jasmine

AngularJS Corner – How to unit test forms

A lot of people are still using AngularJS. It’s hard to port your entire application to a new platform and even language. This week we had a student who asked a very good question: how do you unit test forms in AngularJS? Well, this article got me started. I wanted to put it in context … Read More

Testing Angular 2.0.x Services and Http with Jasmine and Karma

So you’d like to test your HTTP services in Angular 2.0 but you don’t know how? Have some background in Angular 1’s ngMock library? Or just want to see how it’s done? Read this article and follow along with the provided GitHub repo to learn how. Chariot’s Ken Rimple, co-author of our Angular 2 and React training courses, shows you how.

Testing Angular 2 Components with Unit Tests and the TestComponentBuilder (RC1+)

Note – I’ve updated this article and created a new github project using angular-cli to test it. Run all tests with ng test after following instructions at https://github.com/krimple/angular2-unittest-samples-rc Testing Components In my last post, I discussed how to write tests in Angular 2 based on the new angular-testing API. We learned how to stand up … Read More

Testing Http Services in Angular 2 with Jasmine (RC1+)

Right now it's hard to find samples of tests against Angular 2 observable Http code for developers in the current beta. Some of the things you have to watch out for are non-obvious. I expect this will improve vastly over time, but for now hopefully you'll get some working code samples from me to get you going. This post will show you how it’s done.

AngularJS Corner – The ngMock and ngMockE2E libraries

AngularJS provides two powerful mock and test support modules, both contained in a single script file. The modules, ngMock and ngMockE2E, provide different features for different purposes, though both modules are defined in, angular-mocks.js. In this post I’ll explain the differences between the modules and how they get mounted in a test scenario.

TechCast #63 – Davis Frank on Jasmine, the Javascript BDD testing framework

Davis Frank is an agile software engineer who created and contributes to the  open source Jasmine javascript testing framework.  He created the project to help him test applications for the former Palm, now HP webOS mobile application platform, which is written in native Javascript.   Pivotal has a number of projects related to jasmine on … Read More