bootstrap-detached-3.3
Advanced tools
Comparing version 3.3.4-v1 to 3.3.4-v2
@@ -0,1 +1,17 @@ | ||
var $bs; | ||
exports.getBootstrap = function() { | ||
if (!$bs) { | ||
var jquery = require('jquery-detached-2.1.4'); | ||
$bs = jquery.newJQuery(); | ||
exports.addToJQuery($bs); | ||
} | ||
return $bs; | ||
}; | ||
exports.clear = function() { | ||
$bs = undefined; | ||
}; | ||
exports.addToJQuery = function ($) { | ||
@@ -27,2 +43,2 @@ var window = require('window-handle').getWindow(); | ||
} | ||
} | ||
}; |
{ | ||
"name": "bootstrap-detached-3.3", | ||
"version": "3.3.4-v1", | ||
"version": "3.3.4-v2", | ||
"description": "Module for creating Twitter Bootstrap instances, detached from the global namespace (window).", | ||
@@ -18,3 +18,3 @@ "main": "js/index.js", | ||
"gulp-jasmine": "^2.0.1", | ||
"jquery-detached-2.1.4": "^2.1.4-v1", | ||
"jquery-detached-2.1.4": "^2.1.4-v2", | ||
"jsdom": "3.1.2" | ||
@@ -21,0 +21,0 @@ }, |
@@ -12,8 +12,9 @@ /* jslint node: true */ | ||
testUtil.onPage(function(window) { | ||
var $ = require("jquery-detached-2.1.4").getJQuery(); | ||
var bootstrap = require("../js/index"); | ||
bootstrap.addToJQuery($); | ||
bootstrap.clear(); | ||
expect($.fn.jquery).toBe('2.1.4'); | ||
var $1 = bootstrap.getBootstrap(); | ||
expect($1.fn.jquery).toBe('2.1.4'); | ||
@@ -23,6 +24,10 @@ expect(window.$).not.toBeDefined(); | ||
expect($('#divOnPage').text()).toBe('Bootstrap is everywhere'); | ||
expect($.fn.modal).toBeDefined(); | ||
expect($.fn.dropdown).toBeDefined(); | ||
expect($1('#divOnPage').text()).toBe('Bootstrap is everywhere'); | ||
expect($1.fn.modal).toBeDefined(); | ||
expect($1.fn.dropdown).toBeDefined(); | ||
bootstrap.clear(); | ||
var $2 = bootstrap.getBootstrap(); | ||
expect($1).not.toBe($2); | ||
done(); | ||
@@ -29,0 +34,0 @@ }); |
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
39738
208