Book Image

Mastering TypeScript

By : Nathan Rozentals
Book Image

Mastering TypeScript

By: Nathan Rozentals

Overview of this book

<p>The TypeScript compiler and language has brought JavaScript development up to the enterprise level, yet still maintains backward compatibility with existing JavaScript browsers and libraries.</p> <p>Packed with practical code samples, this book brings the benefits of strongly typed, object-oriented programming and design principles into the JavaScript development space. Starting with core language features, and working through more advanced topics such as generics and modules, you will learn how to gain maximum benefit from your JavaScript development with TypeScript. With a strong focus on test-driven development and coverage of many popular JavaScript frameworks, you can fast-track your TypeScript knowledge to a professional level. By the end of this book, you will be able to confidently implement a TypeScript application from scratch.</p>
Table of Contents (17 chapters)
Mastering TypeScript
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
TypeScript – Tools and Framework Options
2
Types, Variables and Function Techniques
Index

Unit testing frameworks


There are many JavaScript unit testing frameworks available, and also a few that have been written in TypeScript. Two of the most popular JavaScript frameworks are Jasmine (http://jasmine.github.io/) and QUnit (http://qunitjs.com/). If you are writing Node TypeScript code, then you might want to have a look at mocha (https://github.com/mochajs/mocha/wiki).

Two of the TypeScript-based testing frameworks are MaxUnit (https://github.com/KnowledgeLakegithub/MaxUnit) and tsUnit (https://github.com/Steve-Fenton/tsUnit). Unfortunately, both MaxUnit and tsUnit are newcomers in this space, and therefore may not have the features that are inherent in the older, more popular frameworks. MaxUnit, for example, did not have any documentation at the time of writing, and tsUnit does not have a test reporting framework compatible with CI build servers. Over time, these TypeScript frameworks may grow, but seeing how easy it is to work with third-party libraries and use DefinitelyTyped...