2017-08-11 08:30:57 +00:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
const Jasmine = require("jasmine");
|
|
|
|
const JasmineConsoleReporter = require('jasmine-console-reporter');
|
|
|
|
const path = require("path");
|
|
|
|
|
2017-08-11 09:57:39 +00:00
|
|
|
const JASMIN_FILTER_KEY = "--filter";
|
|
|
|
|
|
|
|
function getFilterFromProcess() {
|
|
|
|
const filterArg = process.argv.find((arg) => arg.indexOf(JASMIN_FILTER_KEY) === 0);
|
|
|
|
return filterArg ? filterArg.slice(JASMIN_FILTER_KEY.length + 1) : null;
|
|
|
|
}
|
|
|
|
|
|
|
|
const jasmine = new Jasmine({
|
|
|
|
projectBaseDir: __dirname
|
|
|
|
});
|
2017-08-11 08:30:57 +00:00
|
|
|
|
2017-08-11 09:57:39 +00:00
|
|
|
// Load the config file from the default path (${projectBaseDir}/spec/support/jasmine.json).
|
|
|
|
jasmine.loadConfigFile();
|
2017-08-11 08:30:57 +00:00
|
|
|
|
2017-08-11 09:57:39 +00:00
|
|
|
module.exports = jasmine;
|
|
|
|
module.exports.getFilterFromProcess = getFilterFromProcess;
|