Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/*jshint node:true, browser:false */
var jasmineRequire = require('jasmine-core/lib/jasmine-core/jasmine.js');
var JasmineConsoleReporter = require('jasmine-console-reporter');
var Montage = require('../montage');
var PATH = require("path");
global.XMLHttpRequest = require('xhr2');
// Init
var jasmine = jasmineRequire.core(jasmineRequire);
var jasmineEnv = jasmine.getEnv();
// Export interface
var jasmineInterface = jasmineRequire.interface(jasmine, jasmineEnv);
global.jasmine = jasmine;
global.jasmineRequire = jasmineRequire;
for (var property in jasmineInterface) {
if (jasmineInterface.hasOwnProperty(property)) {
global[property] = jasmineInterface[property];
}
}
// Default reporter
jasmineEnv.addReporter(jasmineInterface.jsApiReporter);
// Html reporter
/*jshint node:true, browser:false */
var jasmineRequire = require('jasmine-core/lib/jasmine-core/jasmine.js');
var JasmineConsoleReporter = require('jasmine-console-reporter');
// Init
var jasmine = jasmineRequire.core(jasmineRequire);
var jasmineEnv = jasmine.getEnv();
// Export interface
var jasmineInterface = jasmineRequire.interface(jasmine, jasmineEnv);
global.jasmine = jasmine;
global.jasmineRequire = jasmineRequire;
for (var property in jasmineInterface) {
if (jasmineInterface.hasOwnProperty(property)) {
global[property] = jasmineInterface[property];
}
}
// Default reporter
jasmineEnv.addReporter(jasmineInterface.jsApiReporter);
// Html reporter
/*jshint node:true, browser:false */
var jasmineRequire = require('jasmine-core/lib/jasmine-core/jasmine.js');
var JasmineConsoleReporter = require('jasmine-console-reporter');
var Montage = require('montage');
var PATH = require("path");
// Init
var jasmine = jasmineRequire.core(jasmineRequire);
var jasmineEnv = jasmine.getEnv();
// Export interface
var jasmineInterface = jasmineRequire.interface(jasmine, jasmineEnv);
global.jasmine = jasmine;
global.jasmineRequire = jasmineRequire;
for (var property in jasmineInterface) {
if (jasmineInterface.hasOwnProperty(property)) {
global[property] = jasmineInterface[property];
}
}
// Default reporter
jasmineEnv.addReporter(jasmineInterface.jsApiReporter);
// Html reporter
/*jshint node:true, browser:false */
var jasmineRequire = require('jasmine-core/lib/jasmine-core/jasmine.js');
var JasmineConsoleReporter = require('jasmine-console-reporter');
// Init
var jasmine = jasmineRequire.core(jasmineRequire);
var jasmineEnv = jasmine.getEnv();
// Export interface
var jasmineInterface = jasmineRequire.interface(jasmine, jasmineEnv);
global.jasmine = jasmine;
global.jasmineRequire = jasmineRequire;
for (var property in jasmineInterface) {
if (jasmineInterface.hasOwnProperty(property)) {
global[property] = jasmineInterface[property];
}
}
// Default reporter
jasmineEnv.addReporter(jasmineInterface.jsApiReporter);
// Html reporter
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* =============================================================================
*/
// We use the pattern below (as opposed to require('jasmine') to create the
// jasmine module in order to avoid loading node specific modules which may
// be ignored in browser environments but cannot be ignored in react-native
// due to the pre-bundling of dependencies that it must do.
// tslint:disable-next-line:no-require-imports
const jasmineRequire = require('jasmine-core/lib/jasmine-core/jasmine.js');
const jasmineCore = jasmineRequire.core(jasmineRequire);
import {KernelBackend} from './backends/backend';
import {ENGINE} from './engine';
import {env, Environment, Flags} from './environment';
Error.stackTraceLimit = Infinity;
jasmineCore.DEFAULT_TIMEOUT_INTERVAL = 10000;
export type Constraints = {
flags?: Flags,
predicate?: (testEnv: TestEnv) => boolean,
};
export const NODE_ENVS: Constraints = {
predicate: () => env().platformName === 'node'
};
export const CHROME_ENVS: Constraints = {
function initJasmine(context) {
context.setTimeout = function(fn, delay, params) { fn.apply(this, params); };
context.setInterval = function(fn, delay, params) { print('si');print(fn.toString());};
context.clearInterval = function(fn, delay, params) { print('ci');print(fn.toString());};
context.clearTimeout = function(fn, delay, params) { };
var jasmine = jasmineRequire.core(jasmineRequire);
var env = jasmine.getEnv();
var jI = jasmineRequire.interface(jasmine, env);
extend(context, jI);
var CoRep = jasmineRequire_console.ConsoleReporter();
env.addReporter(new CoRep({print: context.console.log, showColors: true}));
env.specFilter = function(spec) {
//print(spec.getFullName());
//for (var property in spec) print(property);
return true;
};
function extend(destination, source) {
for (var property in source) destination[property] = source[property];
return destination;