Socket
Socket
Sign inDemoInstall

jasmine-core

Package Overview
Dependencies
0
Maintainers
3
Versions
62
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.6.0 to 5.0.0-alpha.0

53

lib/jasmine-core.js

@@ -9,9 +9,32 @@ /**

const bootOnce = (function() {
let jasmine, jasmineInterface;
return function bootWithoutGlobals() {
if (!jasmineInterface) {
jasmine = jasmineRequire.core(jasmineRequire);
const env = jasmine.getEnv({ suppressLoadErrors: true });
jasmineInterface = jasmineRequire.interface(jasmine, env);
}
return {jasmine, jasmineInterface};
};
}());
/**
* Boots a copy of Jasmine and returns an object as described in {@link jasmine}.
* If boot is called multiple times, the same object is returned every time.
* @type {function}
* @return {jasmine}
*/
module.exports.boot = require('./jasmine-core/node_boot.js');
module.exports.boot = function() {
const {jasmine, jasmineInterface} = bootOnce();
for (const k in jasmineInterface) {
global[k] = jasmineInterface[k];
}
return jasmine;
};
/**

@@ -22,21 +45,10 @@ * Boots a copy of Jasmine and returns an object containing the properties

*
* Do not call boot() if you also call noGlobals().
*
* @example
* const {describe, beforeEach, it, expect, jasmine} = require('jasmine-core').noGlobals();
*/
module.exports.noGlobals = (function() {
let jasmineInterface;
module.exports.noGlobals = function() {
const {jasmineInterface} = bootOnce();
return jasmineInterface;
};
return function bootWithoutGlobals() {
if (!jasmineInterface) {
const jasmine = jasmineRequire.core(jasmineRequire);
const env = jasmine.getEnv({ suppressLoadErrors: true });
jasmineInterface = jasmineRequire.interface(jasmine, env);
}
return jasmineInterface;
};
}());
const path = require('path'),

@@ -48,6 +60,5 @@ fs = require('fs');

legacyBootFiles = ['boot.js'],
nodeBootFiles = ['node_boot.js'],
cssFiles = [],
jsFiles = [],
jsFilesToSkip = ['jasmine.js'].concat(bootFiles, legacyBootFiles, nodeBootFiles);
jsFilesToSkip = ['jasmine.js'].concat(bootFiles, legacyBootFiles);

@@ -62,4 +73,4 @@ fs.readdirSync(rootPath).forEach(function(file) {

if (jsFilesToSkip.indexOf(file) < 0) {
jsFiles.push(file);
}
jsFiles.push(file);
}
break;

@@ -71,6 +82,6 @@ }

module.exports.files = {
self: __filename,
path: rootPath,
bootDir: rootPath,
bootFiles: bootFiles,
nodeBootFiles: nodeBootFiles,
cssFiles: cssFiles,

@@ -77,0 +88,0 @@ jsFiles: ['jasmine.js'].concat(jsFiles),

{
"name": "jasmine-core",
"license": "MIT",
"version": "4.6.0",
"version": "5.0.0-alpha.0",
"repository": {

@@ -46,3 +46,3 @@ "type": "git",

"grunt-sass": "^3.0.2",
"jasmine": "^4.1.0",
"jasmine": "github:jasmine/jasmine-npm#5.0",
"jasmine-browser-runner": "^1.0.0",

@@ -105,8 +105,7 @@ "jsdom": "^19.0.0",

"browserslist": [
"Safari >= 14",
"Safari >= 15",
"Firefox >= 102",
"last 2 Chrome versions",
"last 2 Firefox versions",
"Firefox >= 91",
"last 2 Edge versions"
]
}

@@ -35,6 +35,6 @@ <a name="README">[<img src="https://rawgithub.com/jasmine/jasmine/main/images/jasmine-horizontal.svg" width="400px" />](http://jasmine.github.io)</a>

|-------------------|--------------------|
| Node | 12.17+, 14, 16, 18 |
| Safari | 14-16 |
| Node | 16.14-16.19, 18 |
| Safari | 15-16 |
| Chrome | Evergreen |
| Firefox | Evergreen, 91, 102 |
| Firefox | Evergreen, 102 |
| Edge | Evergreen |

@@ -41,0 +41,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc