jasmine-core
Advanced tools
Comparing version 3.2.1 to 3.3.0
@@ -76,15 +76,12 @@ /* | ||
var stoppingOnSpecFailure = queryString.getParam("failFast"); | ||
env.stopOnSpecFailure(stoppingOnSpecFailure); | ||
var config = { | ||
failFast: queryString.getParam("failFast"), | ||
oneFailurePerSpec: queryString.getParam("oneFailurePerSpec"), | ||
hideDisabled: queryString.getParam("hideDisabled") | ||
}; | ||
var throwingExpectationFailures = queryString.getParam("throwFailures"); | ||
env.throwOnExpectationFailure(throwingExpectationFailures); | ||
var hideDisabled = queryString.getParam("hideDisabled"); | ||
env.hideDisabled(hideDisabled); | ||
var random = queryString.getParam("random"); | ||
if (random !== undefined && random !== "") { | ||
env.randomizeTests(random); | ||
config.random = random; | ||
} | ||
@@ -94,3 +91,3 @@ | ||
if (seed) { | ||
env.seed(seed); | ||
config.seed = seed; | ||
} | ||
@@ -126,6 +123,8 @@ | ||
env.specFilter = function(spec) { | ||
config.specFilter = function(spec) { | ||
return specFilter.matches(spec.getFullName()); | ||
}; | ||
env.configure(config); | ||
/** | ||
@@ -132,0 +131,0 @@ * Setting up timing functions to be able to be overridden. Certain browsers (Safari, IE 8, phantomjs) require this hack. |
@@ -83,3 +83,3 @@ /* | ||
function HtmlReporter(options) { | ||
var env = options.env || {}, | ||
var config = function() { return (options.env && options.env.configuration()) || {}; }, | ||
getContainer = options.getContainer, | ||
@@ -171,5 +171,5 @@ createElement = options.createElement, | ||
if(status === 'excluded') { | ||
return env.hidingDisabled() ? 'jasmine-excluded-no-display' : 'jasmine-excluded'; | ||
} | ||
return 'jasmine-' + status; | ||
return config().hideDisabled ? 'jasmine-excluded-no-display' : 'jasmine-excluded'; | ||
} | ||
return 'jasmine-' + status; | ||
}; | ||
@@ -184,3 +184,3 @@ | ||
banner.appendChild(optionsMenu(env)); | ||
banner.appendChild(optionsMenu(config())); | ||
@@ -345,3 +345,3 @@ if (stateBuilder.specsExecuted < totalSpecsDefined) { | ||
function optionsMenu(env) { | ||
function optionsMenu(config) { | ||
var optionsMenuDom = createDom('div', { className: 'jasmine-run-options' }, | ||
@@ -382,23 +382,23 @@ createDom('span', { className: 'jasmine-trigger' }, 'Options'), | ||
var failFastCheckbox = optionsMenuDom.querySelector('#jasmine-fail-fast'); | ||
failFastCheckbox.checked = env.stoppingOnSpecFailure(); | ||
failFastCheckbox.checked = config.failFast; | ||
failFastCheckbox.onclick = function() { | ||
navigateWithNewParam('failFast', !env.stoppingOnSpecFailure()); | ||
navigateWithNewParam('failFast', !config.failFast); | ||
}; | ||
var throwCheckbox = optionsMenuDom.querySelector('#jasmine-throw-failures'); | ||
throwCheckbox.checked = env.throwingExpectationFailures(); | ||
throwCheckbox.checked = config.oneFailurePerSpec; | ||
throwCheckbox.onclick = function() { | ||
navigateWithNewParam('throwFailures', !env.throwingExpectationFailures()); | ||
navigateWithNewParam('throwFailures', !config.oneFailurePerSpec); | ||
}; | ||
var randomCheckbox = optionsMenuDom.querySelector('#jasmine-random-order'); | ||
randomCheckbox.checked = env.randomTests(); | ||
randomCheckbox.checked = config.random; | ||
randomCheckbox.onclick = function() { | ||
navigateWithNewParam('random', !env.randomTests()); | ||
navigateWithNewParam('random', !config.random); | ||
}; | ||
var hideDisabled = optionsMenuDom.querySelector('#jasmine-hide-disabled'); | ||
hideDisabled.checked = env.hidingDisabled(); | ||
hideDisabled.checked = config.hideDisabled; | ||
hideDisabled.onclick = function() { | ||
navigateWithNewParam('hideDisabled', !env.hidingDisabled()); | ||
navigateWithNewParam('hideDisabled', !config.hideDisabled); | ||
}; | ||
@@ -405,0 +405,0 @@ |
{ | ||
"name": "jasmine-core", | ||
"license": "MIT", | ||
"version": "3.2.1", | ||
"version": "3.3.0", | ||
"repository": { | ||
@@ -19,3 +19,3 @@ "type": "git", | ||
"description": "Official packaging of Jasmine's core files for use by Node.js projects.", | ||
"homepage": "http://jasmine.github.io", | ||
"homepage": "https://jasmine.github.io", | ||
"main": "./lib/jasmine-core.js", | ||
@@ -22,0 +22,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
317052
7307