Skip to content

Commit

Permalink
Tests: Remove bogus tests
Browse files Browse the repository at this point in the history
They were trying to test assertions being assigned to it's
own current tests instead of leaking to other tests.

Although they proved their bad implementation on qunitjs#583 and
they should be implemented on logging tests.

Also they're testing the HTML Reporter only.
  • Loading branch information
leobalter committed Jul 15, 2014
1 parent 2c4e480 commit 95d4d70
Showing 1 changed file with 0 additions and 49 deletions.
49 changes: 0 additions & 49 deletions test/test.js
Expand Up @@ -855,55 +855,6 @@ QUnit.test( "Circular reference - test reported by soniciq in #105", function( a
assert.deepEqual( a.children(), [ b ] );
});

function testAfterDone() {
var testName = "ensure has correct number of assertions";

function secondAfterDoneTest() {
QUnit.config.callbacks.done = [];
// Because when this does happen, the assertion count parameter doesn't actually
// work we use this test to check the assertion count.
QUnit.module( "check previous test's assertion counts" );
QUnit.test( "count previous two test's assertions", function( assert ) {
var tests = getPreviousTests( /^ensure has correct number of assertions/, /^Synchronous test after load of page$/ );

assert.equal( tests[ 0 ].firstChild.lastChild.getElementsByTagName( "b" )[ 1 ].innerHTML, "99" );
assert.equal( tests[ 1 ].firstChild.lastChild.getElementsByTagName( "b" )[ 1 ].innerHTML, "99" );
});
}
QUnit.config.callbacks.done = [];
QUnit.done( secondAfterDoneTest );

QUnit.module( "Synchronous test after load of page" );

QUnit.asyncTest( "Async test", function( assert ) {
QUnit.start();
for (var i = 1; i < 100; i++) {
assert.ok( i );
}
});

QUnit.test( testName, function( assert ) {
assert.expect( 99 );
for (var i = 1; i < 100; i++) {
assert.ok( i );
}
});

// We need two of these types of tests in order to ensure that assertions
// don't move between tests.
QUnit.test( testName + " 2", function( assert ) {
assert.expect( 99 );
for (var i = 1; i < 100; i++) {
assert.ok( i );
}
});
}

if ( typeof setTimeout !== "undefined" ) {
QUnit.done( testAfterDone );
}


// Get a reference to the global object, like window in browsers
}( (function() {
return this;
Expand Down

0 comments on commit 95d4d70

Please sign in to comment.