mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-07-13 15:28:32 +08:00
added small exercise for jest testing
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user