This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1543,7 +1543,7 @@ function countDecimals(num) {
1543
1543
1544
1544
if ( decimalSymbolIndex === - 1 ) {
1545
1545
if ( - 1 < num && num < 1 ) {
1546
- // It may be in the exponentional notation format (`1e-X`)
1546
+ // It may be in the exponential notation format (`1e-X`)
1547
1547
var match = / e - ( \d + ) $ / . exec ( numString ) ;
1548
1548
1549
1549
if ( match ) {
Original file line number Diff line number Diff line change @@ -2731,7 +2731,8 @@ describe('input', function() {
2731
2731
expect ( inputElm ) . toBeValid ( ) ;
2732
2732
expect ( $rootScope . value ) . toBe ( 8 ) ;
2733
2733
2734
- $rootScope . $apply ( 'min = 10; step = 20; value = 30' ) ;
2734
+ $rootScope . $apply ( 'min = 10; step = 20' ) ;
2735
+ helper . changeInputValueTo ( '30' ) ;
2735
2736
expect ( inputElm . val ( ) ) . toBe ( '30' ) ;
2736
2737
expect ( inputElm ) . toBeValid ( ) ;
2737
2738
expect ( $rootScope . value ) . toBe ( 30 ) ;
@@ -2748,7 +2749,8 @@ describe('input', function() {
2748
2749
expect ( $rootScope . value ) . toBe ( 30 ) ;
2749
2750
2750
2751
// 0.3 - 0.2 === 0.09999999999999998
2751
- $rootScope . $apply ( 'min = 0.2; step = 0.09999999999999998; value = 0.3' ) ;
2752
+ $rootScope . $apply ( 'min = 0.2; step = (0.3 - 0.2)' ) ;
2753
+ helper . changeInputValueTo ( '0.3' ) ;
2752
2754
expect ( inputElm . val ( ) ) . toBe ( '0.3' ) ;
2753
2755
expect ( inputElm ) . toBeInvalid ( ) ;
2754
2756
expect ( ngModel . $error . step ) . toBe ( true ) ;
You can’t perform that action at this time.
0 commit comments