Home » Posts tagged "typescript"

Unit Testing an Angular 2 CLI Project

This week we want to continue our series about Angular 2 by looking at the Unit Testing capabilities that Angular 2 provides for us.  What we want to cover today is:

  • Tweaking Karma to avoid using the Browser Window
  • Code Coverage
  • Tips to testing components

This article was written using Angular CLI version 1.0.0-beta.20-4  (Tip, if you are upgrading on windows, rm –rf node_modules dist temp just means to delete the three directories.  You can do that part manually, or install bash for Windows and run the command in bash.)

Unit Testing an Angular 2 CLI Project
Photo credit: jimmiehomeschoolmom via VisualHunt.com / CC BY-NC-SA

Continue reading “Unit Testing an Angular 2 CLI Project”

TypeScript and Electron The Right Way

I’ve been working on a new project over the last weeks that involves getting TypeScript and Electron working together.  Unfortunately, the amount of information available on how to do this correctly is pathetically none existent.

That isn’t to say there aren’t sites that don’t try.  But in the end, all they show you is how to write essentially the same JavaScript code you would have written using JavaScript with a little bit of type information thrown in.  What I was looking for was something a little more object oriented.  Let’s use ALL of TypeScript.

And then there is the whole setup of TypeScript in Node thing.  This was mostly my not knowing my editor well.  But while we are documenting how to get a TypeScript/Electron app setup, let’s cover that as well.

TypeScript and Electron The Right Way
Photo credit: Smithsonian Institution via Visual hunt / No known copyright restrictions

Continue reading “TypeScript and Electron The Right Way”