Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export const processListOfItems = (input): [] => {
- let listOfItems = [];
- for (var index = 0; index < rawPayload.length; ++index) {
- listOfItems.push(someFunction(item));
- }
- return listOfItems;
- };
- describe('someFunction fails on an item', () => {
- it('returns the array with the rest of the items', () => {
- const items = ['hi', 'hello'];
- const someFunctionStub = sinon.stub(someFunction).returns(42);
- expect(getListOfItems(items)).toEqual([42, 42]);
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement