Skip to content

Commit 9b79aea

Browse files
committed
better platform support for unit tests
1 parent 58cff8d commit 9b79aea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+405
-383
lines changed

Gruntfile.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ module.exports = function (grunt) {
3939
// Add main script to concat/uglify
4040
filesToBuild.uglify['form-validator/jquery.form-validator.min.js'] = 'form-validator/jquery.form-validator.min.js';
4141
filesToBuild.concat.main = {
42-
src: ['form-validator/jquery.form-validator.js'],
42+
src: ['form-validator/jquery.form-validator.js', 'form-validator/jquery.form-validator-default.js'],
4343
dest: 'form-validator/jquery.form-validator.min.js'
4444
};
4545

@@ -86,6 +86,16 @@ module.exports = function (grunt) {
8686

8787
qunit: {
8888
all: ['test/qunit.html']
89+
},
90+
91+
connect: {
92+
server: {
93+
options: {
94+
port: 8000,
95+
base: '.',
96+
keepalive: true
97+
}
98+
}
8999
}
90100

91101
});
@@ -127,10 +137,11 @@ module.exports = function (grunt) {
127137
grunt.loadNpmTasks("grunt-contrib-jshint");
128138
grunt.loadNpmTasks("grunt-contrib-uglify");
129139
grunt.loadNpmTasks("grunt-contrib-watch");
140+
grunt.loadNpmTasks('grunt-contrib-connect');
130141
grunt.loadNpmTasks('grunt-contrib-qunit');
131142

132143
grunt.registerTask("build", ["version", "concat", "uglify"]);
133-
grunt.registerTask('test', ['jshint', 'qunit']);
144+
grunt.registerTask('test', ['concat', 'jshint', 'qunit']);
134145
grunt.registerTask("default", ["test", "build"]);
135146

136147
};

form-validator/brazil.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
* @website http://formvalidator.net/#brazil-validators
1313
* @license MIT
14-
* @version 2.2.116
14+
* @version 2.2.117
1515
*/
1616

1717
$.formUtils.addValidator({

form-validator/brazil.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

form-validator/date.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* @website http://formvalidator.net/#location-validators
1212
* @license MIT
13-
* @version 2.2.116
13+
* @version 2.2.117
1414
*/
1515
(function($) {
1616

form-validator/date.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
*
44
* @author Victor Jonsson, http://victorjonsson.se
55
* @license MIT
6-
* @version 2.2.116
6+
* @version 2.2.117
77
*/
88
!function(a){a.formUtils.addValidator({name:"time",validatorFunction:function(a){if(null===a.match(/^(\d{2}):(\d{2})$/))return!1;var b=parseInt(a.split(":")[0],10),c=parseInt(a.split(":")[1],10);return b>23||c>59?!1:!0},errorMessage:"",errorMessageKey:"badTime"}),a.formUtils.addValidator({name:"birthdate",validatorFunction:function(b,c,d){var e="yyyy-mm-dd";c.valAttr("format")?e=c.valAttr("format"):"undefined"!=typeof d.dateFormat&&(e=d.dateFormat);var f=a.formUtils.parseDate(b,e);if(!f)return!1;var g=new Date,h=g.getFullYear(),i=f[0],j=f[1],k=f[2];if(i===h){var l=g.getMonth()+1;if(j===l){var m=g.getDate();return m>=k}return l>j}return h>i&&i>h-124},errorMessage:"",errorMessageKey:"badDate"})}(jQuery);

form-validator/file.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* @website http://formvalidator.net/#file-validators
1212
* @license MIT
13-
* @version 2.2.116
13+
* @version 2.2.117
1414
*/
1515
(function($, window) {
1616

form-validator/file.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

form-validator/html5.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
* @website http://formvalidator.net/
1919
* @license MIT
20-
* @version 2.2.116
20+
* @version 2.2.117
2121
*/
2222
(function($, window) {
2323

form-validator/html5.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)