1 | (function (factory) {
|
2 | if (typeof module === "object" && typeof module.exports === "object") {
|
3 | var v = factory(require, exports);
|
4 | if (v !== undefined) module.exports = v;
|
5 | }
|
6 | else if (typeof define === "function" && define.amd) {
|
7 | define(["require", "exports", "url", "../node/util"], factory);
|
8 | }
|
9 | })(function (require, exports) {
|
10 | "use strict";
|
11 | Object.defineProperty(exports, "__esModule", { value: true });
|
12 | var url_1 = require("url");
|
13 | var util_1 = require("../node/util");
|
14 | function resolveSuites(context) {
|
15 | return function (request, response) {
|
16 | var query = url_1.parse(request.url, true).query;
|
17 | var suites = Array.isArray(query.suites)
|
18 | ? query.suites
|
19 | : [query.suites];
|
20 | var resolvedSuites = JSON.stringify(util_1.expandFiles(suites));
|
21 | context.executor.log('resolveSuites middlware expanded', suites, 'to', resolvedSuites);
|
22 | response.writeHead(200, {
|
23 | 'Content-Type': 'application/json',
|
24 | 'Content-Length': resolvedSuites.length
|
25 | });
|
26 | response.end(resolvedSuites);
|
27 | };
|
28 | }
|
29 | exports.default = resolveSuites;
|
30 | });
|
31 |
|
\ | No newline at end of file |