Skip to main content

Learn How to Write Angular 2 Style Unit Tests with Angular 1.X Code


The development of Angular 2 is on its way with much talk, hype, and fanfare. Surprisingly, there is not much being said about unit testing. As a responsible developer, you have undoubtedly already written a giant unit test suite to achieve ‘near perfect’ code coverage, and I'm here to let you know, there is no need to throw that all away! While Angular 2 is currently in ‘developer preview’, implying that nothing serious should be built with it currently, the Angular Team has already created a giant wealth of unit tests and a custom testing setup: (https://github.com/angular/angular/tree/master/modules/angular2/test). Unfortunately, it is not easy to set this up for yourself. So this post should help you get started.

link to full post here

Comments

Popular posts from this blog

Must-see presentation for end to end testing using protractor for angularJS apps

In Wellington AngularJS meetup , I gave a talk on using protractor for end to end testing of angularJS applications . Here I presented and demonstrated some best practices with a live demo on how to get started with using protractor for e2e testing. My presentation and demonstration application are both available online. Links are as below: My presentation My demo angular app for demonstrating some best practices like page objects, reporting, login etc.

Essential Linux Monitoring Tools in 2024

Essential Linux Monitoring Tools in 2024 Essential Linux Monitoring Tools in 2024 In the ever-evolving landscape of IT infrastructure, the role of a system administrator is critical to maintaining the health, performance, and security of Linux servers. With the multitude of monitoring tools available, it's essential to select the right ones to meet your specific needs. This blog explores the essential Linux monitoring tools every sysadmin should consider, categorized into command line, network, system, log, and infrastructure monitoring tools. Command Line Monitoring Tools 1. top/htop top and htop are quintessential for real-time monitoring of system processes. htop offers a more user-friendly and interactive interface compared to top . Real-time process monitoring. CPU, memory, and swap usage. Process management capabilities (kill, renice). 2. iotop iotop is a handy tool for monito...

Are Code Challenges Useful?

Are Code Challenges Useful? Are Code Challenges Useful to Learn? In the rapidly evolving world of technology, staying relevant and sharpening your programming skills are crucial. One method that has gained popularity among both beginners and seasoned developers is the use of code challenges. But are these challenges genuinely useful for learning, or are they just a trendy distraction? Let's delve into the benefits and potential drawbacks of code challenges to understand their role in the learning process. The Benefits of Code Challenges 1. Reinforcement of Concepts Code challenges are excellent for reinforcing theoretical knowledge. They require you to apply concepts in practical scenarios, helping to cement your understanding. When you solve a problem using loops, data structures, or algorithms, the repetition and application in different contexts make these concepts more intuitive and memorable. 2. Problem-Solving...