December 2016
Intermediate to advanced
841 pages
17h
English
Now that the test infrastructure is ready, we will start writing a unit test. We need to remember that we are going to follow the BDD development testing style, which means that we will write the test before we actually write the code.
We will write a web calculator; because we want to keep it simple, we will only implement one of its features. After doing some analysis, we have come up with a design interface that will help us to understand the requirements. We will declare the following interface in the interfaces.d.ts file:
interface MathInterface {
PI : number;
pow( base: number, exponent: number);
}As we can see, the calculator will allow us to calculate the exponent of a number ...
Read now
Unlock full access