Skip to content

Commit f4423f5

Browse files
committed
Tests: Fix draggable_options expected test count to be dynamic
The test count was previously incremented to 8 when normally 6 tests are run. After figuring out the dynamic test code, I just made the expect depend on the same array length Also re-enabled the test in the Gruntfile since it now passes.
1 parent 6870897 commit f4423f5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ grunt.initConfig({
182182
files: expandFiles( "tests/unit/**/*.html" ).filter(function( file ) {
183183
// disabling everything that doesn't (quite) work with PhantomJS for now
184184
// TODO except for all|index|test, try to include more as we go
185-
return !( /(all|index|test|dialog|tooltip|draggable)\.html$/ ).test( file );
185+
return !( /(all|index|test|dialog|tooltip)\.html$/ ).test( file );
186186
})
187187
},
188188
jshint: {

tests/unit/draggable/draggable_options.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,8 @@ test( "helper, default, switching after initialization", function() {
686686
for ( k in scrollElements ) {
687687
(function( position, helper, scrollElements, scrollElementsTitle ){
688688
test( "{ helper: '" + helper + "' }, " + position + ", with scroll offset on " + scrollElementsTitle, function() {
689-
expect( 8 );
689+
expect( scrollPositions.length * 2 );
690+
690691
var i, j,
691692
element = $( "#draggable1" ).css({ position: position, top: 0, left: 0 }).draggable({
692693
helper: helper,

0 commit comments

Comments
 (0)