1
1
import { ethErrors } from 'eth-rpc-errors' ;
2
2
import AutoPairingPostMessageConnection from '../utils/messaging/AutoPairingPostMessageConnection' ;
3
- import { ChainAgnostinProvider } from './ChainAgnosticProvider' ;
3
+ import { ChainAgnosticProvider } from './ChainAgnosticProvider' ;
4
4
5
5
jest . mock ( './utils/onDomReady' ) ;
6
6
jest . mock ( '../utils/messaging/AutoPairingPostMessageConnection' , ( ) => {
@@ -16,15 +16,15 @@ describe('src/background/providers/ChainAgnosticProvider', () => {
16
16
17
17
describe ( 'initialization' , ( ) => {
18
18
it ( 'should connect to the backgroundscript' , async ( ) => {
19
- new ChainAgnostinProvider ( channelMock ) ;
19
+ new ChainAgnosticProvider ( channelMock ) ;
20
20
21
21
expect ( channelMock . connect ) . toHaveBeenCalled ( ) ;
22
22
expect ( channelMock . request ) . not . toHaveBeenCalled ( ) ;
23
23
} ) ;
24
24
it ( 'waits for message channel to be connected' , async ( ) => {
25
25
const mockedChannel = new AutoPairingPostMessageConnection ( false ) ;
26
26
27
- const provider = new ChainAgnostinProvider ( channelMock ) ;
27
+ const provider = new ChainAgnosticProvider ( channelMock ) ;
28
28
expect ( mockedChannel . connect ) . toHaveBeenCalled ( ) ;
29
29
expect ( mockedChannel . request ) . not . toHaveBeenCalled ( ) ;
30
30
@@ -39,7 +39,7 @@ describe('src/background/providers/ChainAgnosticProvider', () => {
39
39
40
40
describe ( 'request' , ( ) => {
41
41
it ( 'should use the rate limits on `eth_requestAccounts` requests' , async ( ) => {
42
- const provider = new ChainAgnostinProvider ( channelMock ) ;
42
+ const provider = new ChainAgnosticProvider ( channelMock ) ;
43
43
( channelMock . request as jest . Mock ) . mockResolvedValue ( 'success' ) ;
44
44
45
45
const firstCallCallback = jest . fn ( ) ;
@@ -66,7 +66,7 @@ describe('src/background/providers/ChainAgnosticProvider', () => {
66
66
) ;
67
67
} ) ;
68
68
it ( 'shoud not use the rate limits on `random_method` requests' , async ( ) => {
69
- const provider = new ChainAgnostinProvider ( channelMock ) ;
69
+ const provider = new ChainAgnosticProvider ( channelMock ) ;
70
70
( channelMock . request as jest . Mock ) . mockResolvedValue ( 'success' ) ;
71
71
72
72
const firstCallCallback = jest . fn ( ) ;
@@ -90,7 +90,7 @@ describe('src/background/providers/ChainAgnosticProvider', () => {
90
90
} ) ;
91
91
92
92
it ( 'should call the request of the connection' , async ( ) => {
93
- const provider = new ChainAgnostinProvider ( channelMock ) ;
93
+ const provider = new ChainAgnosticProvider ( channelMock ) ;
94
94
( channelMock . request as jest . Mock ) . mockResolvedValueOnce ( 'success' ) ;
95
95
96
96
await provider . request ( {
@@ -102,7 +102,7 @@ describe('src/background/providers/ChainAgnosticProvider', () => {
102
102
} ) ;
103
103
describe ( 'CAIP-27' , ( ) => {
104
104
it ( 'should wrap the incoming request into CAIP-27 envelope and reuses the provided ID' , async ( ) => {
105
- const provider = new ChainAgnostinProvider ( channelMock ) ;
105
+ const provider = new ChainAgnosticProvider ( channelMock ) ;
106
106
// response for the actual call
107
107
( channelMock . request as jest . Mock ) . mockResolvedValueOnce ( 'success' ) ;
108
108
0 commit comments