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

Function givenCustomer

examples/references-many/src/__tests__/helpers.ts:36–45  ·  view source on GitHub ↗
(customer?: Partial<Customer>)

Source from the content-addressed store, hash-verified

34 * @param customer - A partial (or complete) Customer object.
35 */
36export function givenCustomer(customer?: Partial<Customer>) {
37 const data = Object.assign(
38 {
39 firstName: 'John',
40 lastName: 'Doe',
41 },
42 customer,
43 );
44 return new Customer(data);
45}
46
47/**
48 * Generate a complete Account object for use with tests.

Callers 3

resetRepositoriesFunction · 0.90
givenCustomerInstanceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected