Comparing version 1.7.2 to 1.7.3
@@ -67,9 +67,4 @@ module.exports = function(grunt) { | ||
pkg: '<json:package.json>', | ||
server: { | ||
port: 8000, | ||
base: './test/fixtures/' | ||
}, | ||
test: { | ||
files: ['test/*.js'], | ||
tasks: 'server' | ||
files: ['test/*.js'] | ||
}, | ||
@@ -105,4 +100,3 @@ lint: { | ||
grunt.registerTask('default', 'build test'); | ||
grunt.registerTask('http_test', 'server test'); | ||
}; |
{ | ||
"name": "jquery", | ||
"description": "jQuery: The Write Less, Do More, JavaScript Library (packaged for Node.JS)", | ||
"version": "1.7.2", | ||
"version": "1.7.3", | ||
"url": "http://jquery.com", | ||
@@ -26,3 +26,3 @@ "homepage": "https://github.com/coolaj86/node-jquery", | ||
"engines": { | ||
"node": "0.6" | ||
"node": ">=0.6" | ||
}, | ||
@@ -35,3 +35,5 @@ "scripts": { | ||
"htmlparser": "1.7.6", | ||
"xmlhttprequest": "~1.3.0" | ||
"xmlhttprequest": "~1.4.2", | ||
"location": "0.0.1", | ||
"navigator": "~1.0.1" | ||
}, | ||
@@ -38,0 +40,0 @@ "devDependencies": { |
(function () { | ||
function create(window) { | ||
var location, navigator, XMLHttpRequest; | ||
window = window || require('jsdom').jsdom().createWindow(); | ||
location = window.location || require('location'); | ||
navigator = window.navigator || require('navigator'); | ||
if(window == null ) { | ||
window = require('jsdom').jsdom().createWindow(); | ||
// assume window is a jsdom instance... | ||
// jsdom includes an incomplete version of XMLHttpRequest | ||
window.XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; | ||
// trick jQuery into thinking CORS is supported (should be in node-XMLHttpRequest) | ||
window.XMLHttpRequest.prototype.withCredentials = false; | ||
if(window.location == null) { | ||
window.location = require('location'); | ||
} | ||
if (!window.XMLHttpRequest && 'function' !== typeof window.ActiveXObject) { | ||
window.XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest; | ||
if(window.navigator == null) { | ||
window.navigator = require('navigator'); | ||
} | ||
} | ||
var location = window.location, | ||
navigator = window.navigator, | ||
XMLHttpRequest = window.XMLHttpRequest; | ||
//JQUERY_SOURCE | ||
@@ -14,0 +27,0 @@ |
var testCase = require('nodeunit').testCase, | ||
jsdom = require('jsdom').jsdom, | ||
static_document = require('fs').readFileSync('test/fixtures/core.html', 'utf8'); | ||
@@ -445,2 +446,10 @@ | ||
}, | ||
"create script tag": function (test) { | ||
var src = null, dom; | ||
test.expect(1); | ||
dom = jsdom('<script src="none.js" type="text/javascript"></script>'); | ||
src = jQuery('script', dom).attr('src'); | ||
test.equals(src, 'none.js', 'script should return proper src attribute'); | ||
test.done(); | ||
}, | ||
"jQuery('html', context)": function(test) { | ||
@@ -511,2 +520,13 @@ test.expect(1); | ||
"attr()": function(test) { | ||
var e = null; | ||
test.expect(4); | ||
test.equals( jQuery('#input1').attr('name'), 'PWD', "Get form element name attribute" ); | ||
test.equals( jQuery('#input2').attr('name'), 'T1', "Get form element name attribute" ); | ||
test.equals( jQuery('item').attr('name'), 'test val', "Get name attribute from element" ); | ||
e = jsdom('<element name="dude" age="25">content</element>'); | ||
test.equals( jQuery('element', e).attr('name'), 'dude', "Get name attribute from element" ); | ||
test.done(); | ||
}, | ||
"each(Function)": function(test) { | ||
@@ -513,0 +533,0 @@ test.expect(1); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
560032
16574
4
5
14
1
+ Addedlocation@0.0.1
+ Addednavigator@~1.0.1
+ Addedlocation@0.0.1(transitive)
+ Addednavigator@1.0.1(transitive)
+ Addedxmlhttprequest@1.4.2(transitive)
- Removedxmlhttprequest@1.3.0(transitive)
Updatedxmlhttprequest@~1.4.2