added small exercise for jest testing

This commit is contained in:
Ken
2019-02-18 20:59:56 -08:00
parent c5cb0abff8
commit b5c038af9e
10 changed files with 92 additions and 20 deletions
+17
View File
@@ -0,0 +1,17 @@
let counter = 0;
export function getCount() {
return counter;
}
export function increment() {
return ++counter;
}
export function decrement() {
return --counter;
}
export function square(x: number) {
return x * x;
}