@ -83,11 +83,14 @@ describe('Confirm Transaction Duck', function () {
}
it ( 'should initialize state' , function ( ) {
assert . deepEqual ( ConfirmTransactionReducer ( undefined , { } ) , initialState )
assert . deepStrictEqual (
ConfirmTransactionReducer ( undefined , { } ) ,
initialState ,
)
} )
it ( 'should return state unchanged if it does not match a dispatched actions type' , function ( ) {
assert . deepEqual (
assert . deepStrict Equal (
ConfirmTransactionReducer ( mockState , {
type : 'someOtherAction' ,
value : 'someValue' ,
@ -97,7 +100,7 @@ describe('Confirm Transaction Duck', function () {
} )
it ( 'should set txData when receiving a UPDATE_TX_DATA action' , function ( ) {
assert . deepEqual (
assert . deepStrict Equal (
ConfirmTransactionReducer ( mockState , {
type : UPDATE _TX _DATA ,
payload : {
@ -115,7 +118,7 @@ describe('Confirm Transaction Duck', function () {
} )
it ( 'should clear txData when receiving a CLEAR_TX_DATA action' , function ( ) {
assert . deepEqual (
assert . deepStrict Equal (
ConfirmTransactionReducer ( mockState , {
type : CLEAR _TX _DATA ,
} ) ,
@ -127,7 +130,7 @@ describe('Confirm Transaction Duck', function () {
} )
it ( 'should set tokenData when receiving a UPDATE_TOKEN_DATA action' , function ( ) {
assert . deepEqual (
assert . deepStrict Equal (
ConfirmTransactionReducer ( mockState , {
type : UPDATE _TOKEN _DATA ,
payload : {
@ -145,7 +148,7 @@ describe('Confirm Transaction Duck', function () {
} )
it ( 'should clear tokenData when receiving a CLEAR_TOKEN_DATA action' , function ( ) {
assert . deepEqual (
assert . deepStrict Equal (
ConfirmTransactionReducer ( mockState , {
type : CLEAR _TOKEN _DATA ,
} ) ,
@ -157,7 +160,7 @@ describe('Confirm Transaction Duck', function () {
} )
it ( 'should set methodData when receiving a UPDATE_METHOD_DATA action' , function ( ) {
assert . deepEqual (
assert . deepStrict Equal (
ConfirmTransactionReducer ( mockState , {
type : UPDATE _METHOD _DATA ,
payload : {
@ -175,7 +178,7 @@ describe('Confirm Transaction Duck', function () {
} )
it ( 'should clear methodData when receiving a CLEAR_METHOD_DATA action' , function ( ) {
assert . deepEqual (
assert . deepStrict Equal (
ConfirmTransactionReducer ( mockState , {
type : CLEAR _METHOD _DATA ,
} ) ,
@ -187,7 +190,7 @@ describe('Confirm Transaction Duck', function () {
} )
it ( 'should update transaction amounts when receiving an UPDATE_TRANSACTION_AMOUNTS action' , function ( ) {
assert . deepEqual (
assert . deepStrict Equal (
ConfirmTransactionReducer ( mockState , {
type : UPDATE _TRANSACTION _AMOUNTS ,
payload : {
@ -206,7 +209,7 @@ describe('Confirm Transaction Duck', function () {
} )
it ( 'should update transaction fees when receiving an UPDATE_TRANSACTION_FEES action' , function ( ) {
assert . deepEqual (
assert . deepStrict Equal (
ConfirmTransactionReducer ( mockState , {
type : UPDATE _TRANSACTION _FEES ,
payload : {
@ -225,7 +228,7 @@ describe('Confirm Transaction Duck', function () {
} )
it ( 'should update transaction totals when receiving an UPDATE_TRANSACTION_TOTALS action' , function ( ) {
assert . deepEqual (
assert . deepStrict Equal (
ConfirmTransactionReducer ( mockState , {
type : UPDATE _TRANSACTION _TOTALS ,
payload : {
@ -244,7 +247,7 @@ describe('Confirm Transaction Duck', function () {
} )
it ( 'should update tokenProps when receiving an UPDATE_TOKEN_PROPS action' , function ( ) {
assert . deepEqual (
assert . deepStrict Equal (
ConfirmTransactionReducer ( mockState , {
type : UPDATE _TOKEN _PROPS ,
payload : {
@ -263,7 +266,7 @@ describe('Confirm Transaction Duck', function () {
} )
it ( 'should update nonce when receiving an UPDATE_NONCE action' , function ( ) {
assert . deepEqual (
assert . deepStrict Equal (
ConfirmTransactionReducer ( mockState , {
type : UPDATE _NONCE ,
payload : '0x1' ,
@ -276,7 +279,7 @@ describe('Confirm Transaction Duck', function () {
} )
it ( 'should update nonce when receiving an UPDATE_TO_SMART_CONTRACT action' , function ( ) {
assert . deepEqual (
assert . deepStrict Equal (
ConfirmTransactionReducer ( mockState , {
type : UPDATE _TO _SMART _CONTRACT ,
payload : true ,
@ -289,7 +292,7 @@ describe('Confirm Transaction Duck', function () {
} )
it ( 'should set fetchingData to true when receiving a FETCH_DATA_START action' , function ( ) {
assert . deepEqual (
assert . deepStrict Equal (
ConfirmTransactionReducer ( mockState , {
type : FETCH _DATA _START ,
} ) ,
@ -301,7 +304,7 @@ describe('Confirm Transaction Duck', function () {
} )
it ( 'should set fetchingData to false when receiving a FETCH_DATA_END action' , function ( ) {
assert . deepEqual (
assert . deepStrict Equal (
ConfirmTransactionReducer (
{ fetchingData : true } ,
{ type : FETCH _DATA _END } ,
@ -311,7 +314,7 @@ describe('Confirm Transaction Duck', function () {
} )
it ( 'should clear confirmTransaction when receiving a FETCH_DATA_END action' , function ( ) {
assert . deepEqual (
assert . deepStrict Equal (
ConfirmTransactionReducer ( mockState , {
type : CLEAR _CONFIRM _TRANSACTION ,
} ) ,
@ -328,7 +331,7 @@ describe('Confirm Transaction Duck', function () {
payload : txData ,
}
assert . deepEqual ( actions . updateTxData ( txData ) , expectedAction )
assert . deepStrict Equal ( actions . updateTxData ( txData ) , expectedAction )
} )
it ( 'should create an action to clear txData' , function ( ) {
@ -336,7 +339,7 @@ describe('Confirm Transaction Duck', function () {
type : CLEAR _TX _DATA ,
}
assert . deepEqual ( actions . clearTxData ( ) , expectedAction )
assert . deepStrict Equal ( actions . clearTxData ( ) , expectedAction )
} )
it ( 'should create an action to update tokenData' , function ( ) {
@ -346,7 +349,7 @@ describe('Confirm Transaction Duck', function () {
payload : tokenData ,
}
assert . deepEqual ( actions . updateTokenData ( tokenData ) , expectedAction )
assert . deepStrict Equal ( actions . updateTokenData ( tokenData ) , expectedAction )
} )
it ( 'should create an action to clear tokenData' , function ( ) {
@ -354,7 +357,7 @@ describe('Confirm Transaction Duck', function () {
type : CLEAR _TOKEN _DATA ,
}
assert . deepEqual ( actions . clearTokenData ( ) , expectedAction )
assert . deepStrict Equal ( actions . clearTokenData ( ) , expectedAction )
} )
it ( 'should create an action to update methodData' , function ( ) {
@ -364,7 +367,10 @@ describe('Confirm Transaction Duck', function () {
payload : methodData ,
}
assert . deepEqual ( actions . updateMethodData ( methodData ) , expectedAction )
assert . deepStrictEqual (
actions . updateMethodData ( methodData ) ,
expectedAction ,
)
} )
it ( 'should create an action to clear methodData' , function ( ) {
@ -372,7 +378,7 @@ describe('Confirm Transaction Duck', function () {
type : CLEAR _METHOD _DATA ,
}
assert . deepEqual ( actions . clearMethodData ( ) , expectedAction )
assert . deepStrict Equal ( actions . clearMethodData ( ) , expectedAction )
} )
it ( 'should create an action to update transaction amounts' , function ( ) {
@ -382,7 +388,7 @@ describe('Confirm Transaction Duck', function () {
payload : transactionAmounts ,
}
assert . deepEqual (
assert . deepStrict Equal (
actions . updateTransactionAmounts ( transactionAmounts ) ,
expectedAction ,
)
@ -395,7 +401,7 @@ describe('Confirm Transaction Duck', function () {
payload : transactionFees ,
}
assert . deepEqual (
assert . deepStrict Equal (
actions . updateTransactionFees ( transactionFees ) ,
expectedAction ,
)
@ -408,7 +414,7 @@ describe('Confirm Transaction Duck', function () {
payload : transactionTotals ,
}
assert . deepEqual (
assert . deepStrict Equal (
actions . updateTransactionTotals ( transactionTotals ) ,
expectedAction ,
)
@ -424,7 +430,10 @@ describe('Confirm Transaction Duck', function () {
payload : tokenProps ,
}
assert . deepEqual ( actions . updateTokenProps ( tokenProps ) , expectedAction )
assert . deepStrictEqual (
actions . updateTokenProps ( tokenProps ) ,
expectedAction ,
)
} )
it ( 'should create an action to update nonce' , function ( ) {
@ -434,7 +443,7 @@ describe('Confirm Transaction Duck', function () {
payload : nonce ,
}
assert . deepEqual ( actions . updateNonce ( nonce ) , expectedAction )
assert . deepStrict Equal ( actions . updateNonce ( nonce ) , expectedAction )
} )
it ( 'should create an action to set fetchingData to true' , function ( ) {
@ -442,7 +451,7 @@ describe('Confirm Transaction Duck', function () {
type : FETCH _DATA _START ,
}
assert . deepEqual ( actions . setFetchingData ( true ) , expectedAction )
assert . deepStrict Equal ( actions . setFetchingData ( true ) , expectedAction )
} )
it ( 'should create an action to set fetchingData to false' , function ( ) {
@ -450,7 +459,7 @@ describe('Confirm Transaction Duck', function () {
type : FETCH _DATA _END ,
}
assert . deepEqual ( actions . setFetchingData ( false ) , expectedAction )
assert . deepStrict Equal ( actions . setFetchingData ( false ) , expectedAction )
} )
it ( 'should create an action to clear confirmTransaction' , function ( ) {
@ -458,7 +467,7 @@ describe('Confirm Transaction Duck', function () {
type : CLEAR _CONFIRM _TRANSACTION ,
}
assert . deepEqual ( actions . clearConfirmTransaction ( ) , expectedAction )
assert . deepStrict Equal ( actions . clearConfirmTransaction ( ) , expectedAction )
} )
} )
@ -526,9 +535,9 @@ describe('Confirm Transaction Duck', function () {
)
const storeActions = store . getActions ( )
assert . e qual( storeActions . length , expectedActions . length )
assert . strictE qual( storeActions . length , expectedActions . length )
storeActions . forEach ( ( action , index ) =>
assert . e qual( action . type , expectedActions [ index ] ) ,
assert . strictE qual( action . type , expectedActions [ index ] ) ,
)
} )
@ -592,9 +601,9 @@ describe('Confirm Transaction Duck', function () {
store . dispatch ( actions . updateTxDataAndCalculate ( txData ) )
const storeActions = store . getActions ( )
assert . e qual( storeActions . length , expectedActions . length )
assert . strictE qual( storeActions . length , expectedActions . length )
storeActions . forEach ( ( action , index ) =>
assert . e qual( action . type , expectedActions [ index ] ) ,
assert . strictE qual( action . type , expectedActions [ index ] ) ,
)
} )
@ -638,10 +647,10 @@ describe('Confirm Transaction Duck', function () {
store . dispatch ( actions . setTransactionToConfirm ( 2603411941761054 ) )
const storeActions = store . getActions ( )
assert . e qual( storeActions . length , expectedActions . length )
assert . strictE qual( storeActions . length , expectedActions . length )
storeActions . forEach ( ( action , index ) =>
assert . e qual( action . type , expectedActions [ index ] ) ,
assert . strictE qual( action . type , expectedActions [ index ] ) ,
)
} )
} )