Last active
October 13, 2017 15:15
-
-
Save davelosert/db5aafdbd349cfc4691f82c1da90494c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Todo} from '../../state/Todo'; | |
import {TodoRepository} from '../TodoRepository'; | |
export const createMockTodoRepository = (): TodoRepository => ({ | |
loadAllTODOs: () => Promise.resolve(createMockTodos()) | |
}); | |
const emptyArray = Array(1000).fill(0); | |
const createMockTodos = () => emptyArray.map((val, index) => | |
({ | |
id: index, | |
userId: 1, | |
title: `Todo#${index}`, | |
completed: false | |
} as Todo)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment