11'use strict'
22
33// NPM dependencies
4- const { expect } = require ( 'chai' )
54const {
65 penceToPounds,
76 poundsToPence,
@@ -19,49 +18,49 @@ const invalidAmountWithLetter = '10.50g'
1918describe ( 'Pence to pounds' , ( ) => {
2019 describe ( `when given valid pence amount ${ validPoundsAndPenceAmount } ` , ( ) => {
2120 it ( `should return ${ validPoundsAndPenceAmount } ` , ( ) => {
22- expect ( penceToPounds ( validPenceAmount ) ) . to . equal ( validPoundsAndPenceAmount )
21+ expect ( penceToPounds ( validPenceAmount ) ) . toEqual ( validPoundsAndPenceAmount )
2322 } )
2423 } )
2524} )
2625
2726describe ( 'Pounds to pence' , ( ) => {
2827 describe ( `when given valid pounds amount ${ validPoundsAndPenceAmount } ` , ( ) => {
2928 it ( `should return ${ validPenceAmount } ` , ( ) => {
30- expect ( poundsToPence ( validPoundsAndPenceAmount ) ) . to . equal ( '1050' )
29+ expect ( poundsToPence ( validPoundsAndPenceAmount ) ) . toEqual ( '1050' )
3130 } )
3231 } )
3332} )
3433
3534describe ( 'Pounds to pence with currency' , ( ) => {
3635 describe ( `when given valid pence amount ${ validPenceAmount } ` , ( ) => {
3736 it ( `should return ${ validPoundsAndPenceAmountWithCurrency } ` , ( ) => {
38- expect ( penceToPoundsWithCurrency ( validPenceAmount ) ) . to . equal ( validPoundsAndPenceAmountWithCurrency )
37+ expect ( penceToPoundsWithCurrency ( validPenceAmount ) ) . toEqual ( validPoundsAndPenceAmountWithCurrency )
3938 } )
4039 } )
4140} )
4241
4342describe ( 'Sanitise pounds and pence user input' , ( ) => {
4443 describe ( `when given pounds and pence amount from user input ${ validPoundsAndPenceAmount } ` , ( ) => {
4544 it ( `should return ${ validPenceAmount } ` , ( ) => {
46- expect ( sanitisePoundsAndPenceInput ( validPoundsAndPenceAmount ) ) . to . equal ( validPenceAmount )
45+ expect ( sanitisePoundsAndPenceInput ( validPoundsAndPenceAmount ) ) . toEqual ( validPenceAmount )
4746 } )
4847 } )
4948
5049 describe ( `when given pounds from user input ${ invalidAmountWithoutDecimals } ` , ( ) => {
5150 it ( `should return ${ validPenceAmount } ` , ( ) => {
52- expect ( sanitisePoundsAndPenceInput ( invalidAmountWithoutDecimals ) ) . to . equal ( 1000 )
51+ expect ( sanitisePoundsAndPenceInput ( invalidAmountWithoutDecimals ) ) . toEqual ( 1000 )
5352 } )
5453 } )
5554
5655 describe ( `when given invalid pounds and pence from user input ${ invalidAmountWithOneDecimals } ` , ( ) => {
5756 it ( `should return ${ validPenceAmount } ` , ( ) => {
58- expect ( sanitisePoundsAndPenceInput ( invalidAmountWithOneDecimals ) ) . to . equal ( validPenceAmount )
57+ expect ( sanitisePoundsAndPenceInput ( invalidAmountWithOneDecimals ) ) . toEqual ( validPenceAmount )
5958 } )
6059 } )
6160
6261 describe ( `when given invalid pounds and pence from user input ${ invalidAmountWithLetter } ` , ( ) => {
6362 it ( `should return ${ validPenceAmount } ` , ( ) => {
64- expect ( sanitisePoundsAndPenceInput ( invalidAmountWithLetter ) ) . to . equal ( validPenceAmount )
63+ expect ( sanitisePoundsAndPenceInput ( invalidAmountWithLetter ) ) . toEqual ( validPenceAmount )
6564 } )
6665 } )
6766} )
0 commit comments