angular-selectize.js
angular-selectize.js copied to clipboard
Tests failing on angular > 1.2.25
The travis build on v1.4.3
passed with angular and angular-mocks v1.2.25
Running them again with a newer 1.2
version results in a failing test.
AssertionError: expected 2 to equal 1
at /Users/d33t/repos/angular-selectize.js/node_modules/chai/chai.js:873
at assertEqual (/Users/d33t/repos/angular-selectize.js/node_modules/chai/chai.js:1386)
at /Users/d33t/repos/angular-selectize.js/node_modules/chai/chai.js:3627
at /Users/d33t/repos/angular-selectize.js/node_modules/chai/chai.js:2483
at testSelectedOption (/Users/d33t/repos/angular-selectize.js/test/selectNgOptions.spec.js:45)
at /Users/d33t/repos/angular-selectize.js/test/selectNgOptions.spec.js:188
The current bower pattern of ^1.2.5
actually matches the 1.3
branch, which results in 16 failed tests.
PhantomJS 1.9.8 (Mac OS X): Executed 106 of 109 (16 FAILED) (1.102 secs / 0.136 secs)
Based on the tests failing, and the fact that angular doesn't follow semver, the bower pattern should definitely be "~1.2.5". Even with that change though, there's a test that needs to be fixed here.
Starting in angular 1.2.26, this is what the domOptions
looks like for the one failing test:
[<option value="? string:foo ?"></option>, <option value="0" selected="selected"></option>]
the extra <option value="? string:foo ?"></option>
in there is what causes the test to fail.
Looks like selectize.removeOption('?');
here fails - something about newer versions of angular are causing the option's value to be different.