Skip to content
Permalink
Browse files

Tests: Change test infrastructure to use AMD and reduce boilerplate

Ref #10119
Ref gh-1528

* Adds RequireJS and relies on AMD for loading dependencies.
* Updates to grunt-contrib-qunit 0.6.0.
* Convert `domEqual()` to a proper QUnit assertion.
* Introduces two bootstrap files (JS and CSS) which use `data-` attributes to
reduce the amount of boilerplate needed in each test
  • Loading branch information...
scottgonzalez committed Apr 3, 2015
1 parent d0ea32e commit 7c896ddb8563e1f4fc655904614cf72d010e2ecb
Showing with 2,584 additions and 1 deletion.
  1. +3 −0 Gruntfile.js
  2. +1 −0 bower.json
  3. +2,076 −0 external/requirejs/require.js
  4. +1 −1 package.json
  5. +1 −0 tests/.jshintrc
  6. +146 −0 tests/lib/bootstrap.js
  7. +133 −0 tests/lib/common.js
  8. +23 −0 tests/lib/css.js
  9. +33 −0 tests/lib/helper.js
  10. +122 −0 tests/lib/qunit-assert-domequal.js
  11. +45 −0 tests/lib/qunit.js
@@ -225,6 +225,7 @@ grunt.initConfig({
return !( /(all|index|test)\.html$/ ).test( file );
}),
options: {
inject: false,
page: {
viewportSize: { width: 700, height: 500 }
}
@@ -284,6 +285,8 @@ grunt.initConfig({
"qunit-composite/qunit-composite.css": "qunit-composite/qunit-composite.css",
"qunit-composite/LICENSE.txt": "qunit-composite/LICENSE.txt",

"requirejs/require.js": "requirejs/require.js",

"jquery-mousewheel/jquery.mousewheel.js": "jquery-mousewheel/jquery.mousewheel.js",
"jquery-mousewheel/LICENSE.txt": "jquery-mousewheel/LICENSE.txt",

@@ -17,6 +17,7 @@
"qunit": "1.18.0",
"qunit-assert-classes": "0.1.5",
"qunit-composite": "JamesMGreene/qunit-composite#v1.0.4",
"requirejs": "2.1.14",

"jquery-1.7.0": "jquery#1.7.0",
"jquery-1.7.1": "jquery#1.7.1",
Oops, something went wrong.

0 comments on commit 7c896dd

Please sign in to comment.
You can’t perform that action at this time.