66 assertIsJsonRpcFailure ,
77} from '.' ;
88
9- describe ( 'isJsonRpcSuccess' , function ( ) {
10- it ( 'correctly identifies JSON-RPC response objects' , function ( ) {
9+ describe ( 'isJsonRpcSuccess' , ( ) => {
10+ it ( 'correctly identifies JSON-RPC response objects' , ( ) => {
1111 (
1212 [
1313 [ { result : 'success' } , true ] ,
@@ -21,8 +21,8 @@ describe('isJsonRpcSuccess', function () {
2121 } ) ;
2222} ) ;
2323
24- describe ( 'isJsonRpcFailure' , function ( ) {
25- it ( 'correctly identifies JSON-RPC response objects' , function ( ) {
24+ describe ( 'isJsonRpcFailure' , ( ) => {
25+ it ( 'correctly identifies JSON-RPC response objects' , ( ) => {
2626 (
2727 [
2828 [ { error : 'failure' } , true ] ,
@@ -36,8 +36,8 @@ describe('isJsonRpcFailure', function () {
3636 } ) ;
3737} ) ;
3838
39- describe ( 'assertIsJsonRpcSuccess' , function ( ) {
40- it ( 'correctly identifies JSON-RPC response objects' , function ( ) {
39+ describe ( 'assertIsJsonRpcSuccess' , ( ) => {
40+ it ( 'correctly identifies JSON-RPC response objects' , ( ) => {
4141 ( [ { result : 'success' } , { result : null } ] as any [ ] ) . forEach ( ( input ) => {
4242 expect ( ( ) => assertIsJsonRpcSuccess ( input ) ) . not . toThrow ( ) ;
4343 } ) ;
@@ -50,8 +50,8 @@ describe('assertIsJsonRpcSuccess', function () {
5050 } ) ;
5151} ) ;
5252
53- describe ( 'assertIsJsonRpcFailure' , function ( ) {
54- it ( 'correctly identifies JSON-RPC response objects' , function ( ) {
53+ describe ( 'assertIsJsonRpcFailure' , ( ) => {
54+ it ( 'correctly identifies JSON-RPC response objects' , ( ) => {
5555 ( [ { error : 'failure' } , { error : null } ] as any [ ] ) . forEach ( ( input ) => {
5656 expect ( ( ) => assertIsJsonRpcFailure ( input ) ) . not . toThrow ( ) ;
5757 } ) ;
@@ -64,7 +64,7 @@ describe('assertIsJsonRpcFailure', function () {
6464 } ) ;
6565} ) ;
6666
67- describe ( 'getJsonRpcIdValidator' , function ( ) {
67+ describe ( 'getJsonRpcIdValidator' , ( ) => {
6868 const getInputs = ( ) => {
6969 return {
7070 // invariant with respect to options
@@ -91,7 +91,7 @@ describe('getJsonRpcIdValidator', function () {
9191 }
9292 } ;
9393
94- it ( 'performs as expected with default options' , function ( ) {
94+ it ( 'performs as expected with default options' , ( ) => {
9595 const inputs = getInputs ( ) ;
9696
9797 // The default options are:
@@ -101,7 +101,7 @@ describe('getJsonRpcIdValidator', function () {
101101 expect ( ( ) => validateAll ( getJsonRpcIdValidator ( ) , inputs ) ) . not . toThrow ( ) ;
102102 } ) ;
103103
104- it ( 'performs as expected with "permitEmptyString: false"' , function ( ) {
104+ it ( 'performs as expected with "permitEmptyString: false"' , ( ) => {
105105 const inputs = getInputs ( ) ;
106106 inputs . emptyString . expected = false ;
107107
@@ -115,7 +115,7 @@ describe('getJsonRpcIdValidator', function () {
115115 ) . not . toThrow ( ) ;
116116 } ) ;
117117
118- it ( 'performs as expected with "permitFractions: true"' , function ( ) {
118+ it ( 'performs as expected with "permitFractions: true"' , ( ) => {
119119 const inputs = getInputs ( ) ;
120120 inputs . fraction . expected = true ;
121121
@@ -129,7 +129,7 @@ describe('getJsonRpcIdValidator', function () {
129129 ) . not . toThrow ( ) ;
130130 } ) ;
131131
132- it ( 'performs as expected with "permitNull: false"' , function ( ) {
132+ it ( 'performs as expected with "permitNull: false"' , ( ) => {
133133 const inputs = getInputs ( ) ;
134134 inputs . null . expected = false ;
135135
0 commit comments