UNPKG

ui5-test-runner

Version:
26 lines (24 loc) 684 B
const cors = require('./cors') const endpoints = require('./endpoints') const { mappings: coverage } = require('./coverage') const { mappings: ui5 } = require('./ui5') const { check } = require('reserve') const unhandled = require('./unhandled') module.exports = async job => check({ port: job.port, mappings: [ cors, ...job.mappings ?? [], ...job.serveOnly ? [] : endpoints(job), ...await ui5(job), ...job.serveOnly ? [] : await coverage(job), { // Project mapping match: /^\/(.*)/, cwd: job.webapp, file: '$1', static: !job.watch && !job.debugDevMode }, ...job.serveOnly ? [{ status: 404 }] : unhandled(job) ] })