1
- import { baseCharge , withinBand , topBand } from '.' ;
1
+ import { baseCharge , withinBand } from '.' ;
2
2
3
3
describe ( 'baseCharge' , ( ) => {
4
4
it ( 'should return 0 when usage is less than 0' , ( ) => {
@@ -15,27 +15,15 @@ describe('baseCharge', () => {
15
15
} ) ;
16
16
} ) ;
17
17
18
- describe ( 'usage bands' , ( ) => {
19
- describe ( 'withinBand' , ( ) => {
20
- const bottom = 100 ;
21
- const top = 200 ;
18
+ describe ( 'withinBand' , ( ) => {
19
+ const bottom = 100 ;
20
+ const top = 200 ;
22
21
23
- it ( 'should return the middle band of usage' , ( ) => {
24
- expect ( withinBand ( 50 , bottom , top ) ) . toEqual ( 0 ) ;
25
- expect ( withinBand ( 100 , bottom , top ) ) . toEqual ( 0 ) ;
26
- expect ( withinBand ( 150 , bottom , top ) ) . toEqual ( 50 ) ;
27
- expect ( withinBand ( 200 , bottom , top ) ) . toEqual ( 100 ) ;
28
- expect ( withinBand ( 250 , bottom , top ) ) . toEqual ( 100 ) ;
29
- } ) ;
30
- } ) ;
31
-
32
- describe ( 'topBand' , ( ) => {
33
- it ( 'should return the top band of usage' , ( ) => {
34
- expect ( topBand ( 50 ) ) . toEqual ( 0 ) ;
35
- expect ( topBand ( 100 ) ) . toEqual ( 0 ) ;
36
- expect ( topBand ( 150 ) ) . toEqual ( 0 ) ;
37
- expect ( topBand ( 200 ) ) . toEqual ( 0 ) ;
38
- expect ( topBand ( 250 ) ) . toEqual ( 50 ) ;
39
- } ) ;
22
+ it ( 'should return the middle band of usage' , ( ) => {
23
+ expect ( withinBand ( 50 , bottom , top ) ) . toEqual ( 0 ) ;
24
+ expect ( withinBand ( 100 , bottom , top ) ) . toEqual ( 0 ) ;
25
+ expect ( withinBand ( 150 , bottom , top ) ) . toEqual ( 50 ) ;
26
+ expect ( withinBand ( 200 , bottom , top ) ) . toEqual ( 100 ) ;
27
+ expect ( withinBand ( 250 , bottom , top ) ) . toEqual ( 100 ) ;
40
28
} ) ;
41
29
} ) ;
0 commit comments