const { FACEAI_BASE_URL, SIMULATOR_URL, dockerCompose, prepareHostState, runCommand, waitForHttp } = require('./faceai-test-utils'); module.exports = async () => { await prepareHostState(); await dockerCompose(['down', '-v', '--remove-orphans'], { allowFailure: true }); await runCommand('npm', ['run', 'build']); await dockerCompose(['up', '--build', '-d']); await waitForHttp(`${FACEAI_BASE_URL}/health`, ({ response, parsedBody }) => { return response.ok && parsedBody && parsedBody.ok === true; }); await waitForHttp(`${FACEAI_BASE_URL}/api/health/queue`, ({ response, parsedBody }) => { return response.ok && parsedBody && parsedBody.ok === true; }); await waitForHttp(SIMULATOR_URL, ({ response, bodyText }) => { return response.ok && bodyText.includes('FaceAI Legacy Simulator'); }); };