cpt-waffle-lotide
Version:
LoTide in Typescript
25 lines (21 loc) • 613 B
text/typescript
import countOnly from '../countOnly';
import { objectInterface } from '../interfaces';
const firstNames:string[] = [
"Karl",
"Salima",
"Agouhanna",
"Fang",
"Kavith",
"Jason",
"Salima",
"Fang",
"Joe"
];
const only:objectInterface= { "Jason": true, "Karima": true, "Fang": true, "Agouhanna": false };
describe('countOnly() tests, with following object', ():void => {
it(' should return { Jason: 1, Fang: 2 } ', ():void => {
const expectedVal:objectInterface = { Jason: 1, Fang: 2 };
const result:objectInterface = countOnly(firstNames, only);
expect(result).toEqual(expectedVal);
})
})