File tree Expand file tree Collapse file tree 3 files changed +30
-28
lines changed
Expand file tree Collapse file tree 3 files changed +30
-28
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ import { NormalUserDailyBonusPointsCalculator } from "../src/NormalUserDailyBonusPointsCalculator" ;
2+
3+ describe ( 'NormalUserDailyBonusPointsCalculator should' , ( ) => {
4+ it ( 'Calculate points for a normal user on its first day' , ( ) => {
5+ const calculator = new NormalUserDailyBonusPointsCalculator ( ) ;
6+
7+ expect ( calculator . calculate ( 1 ) ) . toBe ( 10 ) ;
8+ } ) ;
9+
10+ it ( 'Calculate points for a normal user on its second consecutive week' , ( ) => {
11+ const calculator = new NormalUserDailyBonusPointsCalculator ( ) ;
12+
13+ expect ( calculator . calculate ( 14 ) ) . toBe ( 140 ) ;
14+ } ) ;
15+ } ) ;
Original file line number Diff line number Diff line change 1+ import { PremiumUserDailyBonusPointsCalculator } from "../src/PremiumUserDailyBonusPointsCalculator" ;
2+
3+ describe ( 'PremiumUserDailyBonusPointsCalculator should' , ( ) => {
4+ it ( 'Calculate points for a premium user on its first day' , ( ) => {
5+ const calculator = new PremiumUserDailyBonusPointsCalculator ( ) ;
6+
7+ expect ( calculator . calculate ( 1 ) ) . toBe ( 20 ) ;
8+ } ) ;
9+
10+ it ( 'Calculate points for a premium user on its second consecutive week' , ( ) => {
11+ const calculator = new PremiumUserDailyBonusPointsCalculator ( ) ;
12+
13+ expect ( calculator . calculate ( 14 ) ) . toBe ( 630 ) ;
14+ } ) ;
15+ } ) ;
You can’t perform that action at this time.
0 commit comments