@bengo.co/typescript-web-starter
Version:
A simple website project written in TypeScript. Use this as a starting point for your project.
29 lines (26 loc) • 650 B
text/typescript
import { AsyncTest, Expect, TestCase, TestFixture } from "alsatian";
import { cli } from "./cli";
/**
* Sample tests to prove that testing works
*/
("Testing the Test Framework")
export class TestAddition {
// tslint:disable-line:export-name
/** Test a simple addition function */
(2, 2, 4)
(2, 3, 5)
(3, 3, 6)
("addition tests")
public async addTest(
firstNumber: number,
secondNumber: number,
expectedSum: number,
): Promise<void> {
Expect(firstNumber + secondNumber).toBe(expectedSum);
}
}
if (require.main === module) {
cli(__filename).catch(error => {
throw error;
});
}