UNPKG

1.6 kBSource Map (JSON)View Raw
1{"version":3,"file":"resolveSuites.js","sourceRoot":"","sources":["../../../../src/lib/middleware/resolveSuites.ts"],"names":[],"mappings":";;;;;;;;;;;IAAA,2BAA4B;IAI5B,qCAA2C;IAE3C,SAAwB,aAAa,CAAC,OAAgB;QACpD,OAAO,UAAC,OAAO,EAAE,QAAQ;YACvB,IAAM,KAAK,GAAG,WAAK,CAAC,OAAO,CAAC,GAAI,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC;YAC9C,IAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC;gBACxC,CAAC,CAAC,KAAK,CAAC,MAAO;gBACf,CAAC,CAAC,CAAC,KAAK,CAAC,MAAO,CAAC,CAAC;YACpB,IAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,kBAAW,CAAC,MAAM,CAAC,CAAC,CAAC;YAC3D,OAAO,CAAC,QAAQ,CAAC,GAAG,CAClB,kCAAkC,EAClC,MAAM,EACN,IAAI,EACJ,cAAc,CACf,CAAC;YACF,QAAQ,CAAC,SAAS,CAAC,GAAG,EAAE;gBACtB,cAAc,EAAE,kBAAkB;gBAClC,gBAAgB,EAAE,cAAc,CAAC,MAAM;aACxC,CAAC,CAAC;YACH,QAAQ,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAC/B,CAAC,CAAC;IACJ,CAAC;IAnBD,gCAmBC","sourcesContent":["import { parse } from 'url';\nimport { RequestHandler } from 'express';\n\nimport { Context } from '../Server';\nimport { expandFiles } from '../node/util';\n\nexport default function resolveSuites(context: Context): RequestHandler {\n return (request, response) => {\n const query = parse(request.url!, true).query;\n const suites = Array.isArray(query.suites)\n ? query.suites!\n : [query.suites!];\n const resolvedSuites = JSON.stringify(expandFiles(suites));\n context.executor.log(\n 'resolveSuites middlware expanded',\n suites,\n 'to',\n resolvedSuites\n );\n response.writeHead(200, {\n 'Content-Type': 'application/json',\n 'Content-Length': resolvedSuites.length\n });\n response.end(resolvedSuites);\n };\n}\n"]}
\No newline at end of file