// Copyright IBM Corp. and LoopBack contributors 2019,2020. All Rights Reserved. // Node module: @loopback/example-todo-list // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT import { Client, createRestAppClient, givenHttpServerConfig, } from '@loopback/testlab'; import {TodoListApplication} from '../..'; export async function setupApplication(): Promise { const app = new TodoListApplication({ rest: givenHttpServerConfig(), }); await app.boot(); await app.start(); const client = createRestAppClient(app); return {app, client}; } export interface AppWithClient { app: TodoListApplication; client: Client; }