Merge pull request #219 from carlfeberhard/testing

Update qunit tests
This commit is contained in:
John Chilton
2015-05-06 08:38:44 -05:00
10 changed files with 17 additions and 14 deletions
+7
View File
@@ -23,3 +23,10 @@ From Web Browser (no additional dependencies):
Just open test HTML file in Web Browser.
Note:
The combination of requirejs and phantomjs used to load some of these
scripts can lead to error suppression. If any of the dependencies of the
scripts you're requiring throw an error, grunt+phantom+require will not
show a visible error (even with --verbose and/or --debug). You will instead
see a timeout error thrown from phantomjs.
This generally(?) applies only to errors when evaluating the dependency.
-1
View File
@@ -13,7 +13,6 @@ define([
){
/*globals equal test module expect deepEqual strictEqual */
"use strict";
module( "HDA base backbone view tests" );
test( "Base HDA view default construction, initialize", function() {
@@ -2,6 +2,7 @@
// (or demonstrating) qunit+backbone interactions.
define([
"mvc/history/hda-model",
"jquery",
"sinon-qunit"
], function(
-2
View File
@@ -4,8 +4,6 @@ define([
"sinon-qunit",
'test-data/job-dag-1'
], function( JobDAG, $, sinon, testData ){
console.debug( '' );
/*globals equal ok, test module expect deepEqual strictEqual */
"use strict";
@@ -1,5 +1,5 @@
define([
"mvc/collection/paired-collection-creator",
"mvc/collection/list-of-pairs-collection-creator",
"test-data/paired-collection-creator.data",
"jquery",
"sinon-qunit"
@@ -19,11 +19,10 @@ define([
test( "Creator base/empty construction/initializiation defaults", function() {
var pcc = new PCC([]);
ok( pcc instanceof PCC );
ok( pcc.hasOwnProperty( 'options' ) && typeof pcc.options === 'object' );
deepEqual( pcc.options.filters, pcc.DEFAULT_FILTERS );
ok( pcc.options.automaticallyPair );
equal( pcc.options.matchPercentage, 0.9 );
equal( pcc.options.strategy, 'lcs' );
deepEqual( pcc.filters, pcc.commonFilters[ pcc.DEFAULT_FILTERS ] );
ok( pcc.automaticallyPair );
equal( pcc.matchPercentage, 0.9 );
equal( pcc.strategy, 'autopairLCS' );
});
test( "Creator construction/initializiation with datasets", function() {
+1 -2
View File
@@ -66,7 +66,6 @@ define([
};
module( "Metrics logger tests" );
console.debug( '\n' );
// ======================================================================== MetricsLogger
test( "logger construction/initializiation defaults", function() {
var logger = new metrics.MetricsLogger({});
@@ -177,7 +176,7 @@ define([
logger.emit( 'metric', 'test', [ 1, 2, { three: 3 }] );
logger._postCache();
server.respond();
ok( callback.calledOnce, 'onServerResponse was called' );
equal( logger.cache.length(), 0, 'should have emptied cache (on success)' );
equal( logger._postSize, 1000, '_postSize still at default' );