MCPcopy Create free account
hub / github.com/loopbackio/loopback-next / givenTodo

Function givenTodo

examples/todo/src/__tests__/helpers.ts:37–47  ·  view source on GitHub ↗
(todo?: Partial<Todo>)

Source from the content-addressed store, hash-verified

35 * @param todo - A partial (or complete) Todo object.
36 */
37export function givenTodo(todo?: Partial<Todo>) {
38 const data = Object.assign(
39 {
40 title: 'do a thing',
41 desc: 'There are some things that need doing',
42 isComplete: false,
43 },
44 todo,
45 );
46 return new Todo(data);
47}
48
49export const aLocation = {
50 address: '1 New Orchard Road, Armonk, 10504',

Callers 4

resetRepositoriesFunction · 0.90
todo.acceptance.tsFile · 0.90
givenTodoInstanceFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected