constructor()

in suiteData.js [15:29]


    constructor(obj, query) {
        this.name = (query && query.name) || (obj && obj.name);
        if (!this.name) {
            throw new Error("A suite 'name' parameter should be included on the query string or in the request body.");
        }
        var tests = obj && obj.tests;
        if (!tests || !_.isArray(tests)) {
            throw new Error("A suite must contain a 'tests' array.");
        }
        else if (tests.length == 0) {
            throw new Error("The suite 'tests' array must not be empty.");
        }
        this.tests = tests;
        this.defaults = _.pick(_.extend(obj, query), TestData.inheritedProperties());
    }