mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
amend(slideBox): check index validity when select happens
This commit is contained in:
@@ -346,11 +346,13 @@ describe('ionSlideBox', function() {
|
||||
|
||||
// Do nothing for -1
|
||||
$del.select(-1);
|
||||
$timeout.verifyNoPendingTasks();
|
||||
$timeout.flush();
|
||||
expect($del.selected()).toBe(0);
|
||||
|
||||
// Do nothing for NaN
|
||||
$del.select(NaN);
|
||||
$timeout.verifyNoPendingTasks();
|
||||
$timeout.flush();
|
||||
expect($del.selected()).toBe(0);
|
||||
|
||||
// parse to int
|
||||
$del.select('1');
|
||||
|
||||
Reference in New Issue
Block a user