Skip to content

Commit ef64619

Browse files
committed
Merge pull request #16 from bboyle/jquery
Jquery
2 parents 5f3a5f4 + 52f4231 commit ef64619

File tree

5 files changed

+51
-12
lines changed

5 files changed

+51
-12
lines changed

Gruntfile.js

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ module.exports = function( grunt ) {
1515
clean: {
1616
files: [ 'dist' ]
1717
},
18+
connect: {
19+
server: {
20+
options: {
21+
port: 8000,
22+
base: '.'
23+
}
24+
}
25+
},
1826
// production pipeline tasks
1927
uglify: {
2028
options: {
@@ -27,7 +35,36 @@ module.exports = function( grunt ) {
2735
},
2836
// code quality tasks
2937
qunit: {
30-
files: [ 'test/**/*.html' ]
38+
unit: [ 'test/**/*.html' ],
39+
// test other jquery versions
40+
jquery: {
41+
options: {
42+
timeout: 12000,
43+
urls: [
44+
'http://localhost:8000/test/change.html?jquery=1.4.4',
45+
'http://localhost:8000/test/checkValidity.html?jquery=1.4.4',
46+
'http://localhost:8000/test/custom.html?jquery=1.4.4',
47+
'http://localhost:8000/test/disabled.html?jquery=1.4.4',
48+
'http://localhost:8000/test/email.html?jquery=1.4.4',
49+
'http://localhost:8000/test/invalid.html?jquery=1.4.4',
50+
'http://localhost:8000/test/novalidate.html?jquery=1.4.4',
51+
'http://localhost:8000/test/pattern.html?jquery=1.4.4',
52+
'http://localhost:8000/test/required.html?jquery=1.4.4',
53+
'http://localhost:8000/test/submit.html?jquery=1.4.4',
54+
// latest
55+
'http://localhost:8000/test/change.html?jquery=2.1.0',
56+
'http://localhost:8000/test/checkValidity.html?jquery=2.1.0',
57+
'http://localhost:8000/test/custom.html?jquery=2.1.0',
58+
'http://localhost:8000/test/disabled.html?jquery=2.1.0',
59+
'http://localhost:8000/test/email.html?jquery=2.1.0',
60+
'http://localhost:8000/test/invalid.html?jquery=2.1.0',
61+
'http://localhost:8000/test/novalidate.html?jquery=2.1.0',
62+
'http://localhost:8000/test/pattern.html?jquery=2.1.0',
63+
'http://localhost:8000/test/required.html?jquery=2.1.0',
64+
'http://localhost:8000/test/submit.html?jquery=2.1.0',
65+
]
66+
}
67+
}
3168
},
3269
jshint: {
3370
gruntfile: {
@@ -61,24 +98,25 @@ module.exports = function( grunt ) {
6198
},
6299
src: {
63100
files: '<%= jshint.src.src %>',
64-
tasks: [ 'jshint:src', 'qunit' ]
101+
tasks: [ 'jshint:src', 'qunit:unit' ]
65102
},
66103
test: {
67104
files: '<%= jshint.test.src %>',
68-
tasks: [ 'jshint:test', 'qunit' ]
105+
tasks: [ 'jshint:test', 'qunit:unit' ]
69106
},
70107
}
71108
});
72109

73110
// These plugins provide necessary tasks.
74111
grunt.loadNpmTasks( 'grunt-contrib-clean' );
75112
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
113+
grunt.loadNpmTasks( 'grunt-contrib-connect' );
76114
grunt.loadNpmTasks( 'grunt-contrib-qunit' );
77115
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
78116
grunt.loadNpmTasks( 'grunt-contrib-watch' );
79117

80118
// Default task.
81-
grunt.registerTask( 'test', [ 'jshint', 'qunit' ]);
119+
grunt.registerTask( 'test', [ 'jshint', 'connect', 'qunit' ]);
82120
grunt.registerTask( 'produce', [ 'clean', 'uglify' ]);
83121
grunt.registerTask( 'default', [ 'test', 'produce' ]);
84122

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "html5.constraintValidationAPI",
33
"title": "HTML5 constraintValidationAPI",
4-
"version": "1.0.1",
4+
"version": "1.0.2",
55
"homepage": "https://github.com/bboyle/html5-constraint-validation-API",
66
"authors": [
77
"Ben Boyle <[email protected]>"

dist/html5.constraintValidationAPI.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "html5.constraintValidationAPI",
33
"title": "HTML5 constraintValidationAPI",
44
"description": "A polyfill for the HTML5 constraintValidationAPI",
5-
"version": "1.0.1",
5+
"version": "1.0.2",
66
"homepage": "https://github.com/bboyle/html5-constraint-validation-API",
77
"author": {
88
"name": "Ben Boyle",
@@ -36,7 +36,8 @@
3636
"grunt-contrib-watch": "~0.6.1",
3737
"grunt-contrib-uglify": "~0.4.0",
3838
"grunt-contrib-jshint": "~0.9.2",
39-
"grunt-contrib-qunit": "~0.4.0"
39+
"grunt-contrib-qunit": "~0.4.0",
40+
"grunt-contrib-connect": "~0.7.1"
4041
},
4142
"scripts": {
4243
"test": "grunt test"

test/checkValidity.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
// setup - detect invalid events
3131
var invalidDetectedOnFoo = 0;
3232

33-
$( '#foo' ).on( 'invalid.TEST', function() {
33+
$( '#foo' ).bind( 'invalid.TEST', function() {
3434
invalidDetectedOnFoo++;
3535
strictEqual( invalidDetectedOnFoo, 1, 'invalid event detected on foo' );
3636
});
@@ -42,7 +42,7 @@
4242
strictEqual( $( '#foo' )[ 0 ].checkValidity(), true, 'foo is valid' );
4343

4444
// teardown
45-
$( '#foo' ).on( 'invalid.TEST' );
45+
$( '#foo' ).unbind( 'invalid.TEST' );
4646
});
4747

4848

0 commit comments

Comments
 (0)