@meshconnect/web-link-sdk 3.2.14 → 3.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/jest.setup.ts +4 -0
  2. package/package.json +20 -8
  3. package/src/Link.test.ts +434 -0
  4. package/src/Link.ts +491 -0
  5. package/src/index.ts +3 -0
  6. package/src/utils/__snapshots__/popup.test.ts.snap +89 -0
  7. package/src/utils/connectors/evm/chainConfigs.ts +120 -0
  8. package/src/utils/connectors/evm/chainSwitching.ts +165 -0
  9. package/src/utils/connectors/evm/index.ts +8 -0
  10. package/src/utils/connectors/evm/provider.ts +22 -0
  11. package/src/utils/connectors/evm/signing.ts +39 -0
  12. package/src/utils/connectors/evm/transactions.ts +356 -0
  13. package/src/utils/connectors/evm/types.ts +63 -0
  14. package/src/utils/connectors/evm/walletConnection.ts +140 -0
  15. package/src/utils/connectors/evm/walletDiscovery.ts +67 -0
  16. package/src/utils/connectors/solana/connection.ts +69 -0
  17. package/src/utils/connectors/solana/index.ts +5 -0
  18. package/src/utils/connectors/solana/providerDiscovery.ts +153 -0
  19. package/src/utils/connectors/solana/signing.ts +18 -0
  20. package/src/utils/connectors/solana/transaction.ts +382 -0
  21. package/src/utils/connectors/solana/types.ts +66 -0
  22. package/{utils/event-types.js → src/utils/event-types.test.ts} +15 -5
  23. package/src/utils/event-types.ts +350 -0
  24. package/src/utils/popup.test.ts +50 -0
  25. package/src/utils/popup.ts +123 -0
  26. package/src/utils/sdk-specs.test.ts +18 -0
  27. package/src/utils/sdk-specs.ts +7 -0
  28. package/src/utils/style.test.ts +33 -0
  29. package/src/utils/style.ts +15 -0
  30. package/src/utils/types.ts +270 -0
  31. package/src/utils/version.ts +1 -0
  32. package/src/utils/wallet/EVMWalletStrategy.ts +176 -0
  33. package/src/utils/wallet/SolanaWalletStrategy.ts +207 -0
  34. package/src/utils/wallet/WalletStrategy.ts +99 -0
  35. package/src/utils/wallet/WalletStrategyFactory.ts +46 -0
  36. package/src/utils/wallet/__tests__/EVMWalletStrategy.test.ts +233 -0
  37. package/src/utils/wallet/__tests__/SolanaWalletStrategy.test.ts +253 -0
  38. package/src/utils/wallet/__tests__/WalletStrategy.test.ts +77 -0
  39. package/src/utils/wallet/__tests__/WalletStrategyFactory.test.ts +65 -0
  40. package/src/utils/wallet/index.ts +4 -0
  41. package/src/utils/wallet-browser-event-types.ts +190 -0
  42. package/tools/copy.js +26 -0
  43. package/tools/update-version.js +10 -0
  44. package/tsconfig.json +14 -0
  45. package/Link.d.ts +0 -2
  46. package/Link.js +0 -530
  47. package/index.d.ts +0 -3
  48. package/index.js +0 -3
  49. package/utils/connectors/evm/chainConfigs.d.ts +0 -2
  50. package/utils/connectors/evm/chainConfigs.js +0 -115
  51. package/utils/connectors/evm/chainSwitching.d.ts +0 -15
  52. package/utils/connectors/evm/chainSwitching.js +0 -242
  53. package/utils/connectors/evm/index.d.ts +0 -8
  54. package/utils/connectors/evm/index.js +0 -8
  55. package/utils/connectors/evm/provider.d.ts +0 -6
  56. package/utils/connectors/evm/provider.js +0 -13
  57. package/utils/connectors/evm/signing.d.ts +0 -1
  58. package/utils/connectors/evm/signing.js +0 -78
  59. package/utils/connectors/evm/transactions.d.ts +0 -28
  60. package/utils/connectors/evm/transactions.js +0 -381
  61. package/utils/connectors/evm/types.d.ts +0 -57
  62. package/utils/connectors/evm/types.js +0 -1
  63. package/utils/connectors/evm/walletConnection.d.ts +0 -20
  64. package/utils/connectors/evm/walletConnection.js +0 -160
  65. package/utils/connectors/evm/walletDiscovery.d.ts +0 -10
  66. package/utils/connectors/evm/walletDiscovery.js +0 -55
  67. package/utils/connectors/solana/connection.d.ts +0 -4
  68. package/utils/connectors/solana/connection.js +0 -108
  69. package/utils/connectors/solana/index.d.ts +0 -5
  70. package/utils/connectors/solana/index.js +0 -5
  71. package/utils/connectors/solana/providerDiscovery.d.ts +0 -3
  72. package/utils/connectors/solana/providerDiscovery.js +0 -127
  73. package/utils/connectors/solana/signing.d.ts +0 -1
  74. package/utils/connectors/solana/signing.js +0 -59
  75. package/utils/connectors/solana/transaction.d.ts +0 -17
  76. package/utils/connectors/solana/transaction.js +0 -362
  77. package/utils/connectors/solana/types.d.ts +0 -71
  78. package/utils/connectors/solana/types.js +0 -8
  79. package/utils/event-types.d.ts +0 -233
  80. package/utils/popup.d.ts +0 -3
  81. package/utils/popup.js +0 -36
  82. package/utils/sdk-specs.d.ts +0 -5
  83. package/utils/sdk-specs.js +0 -6
  84. package/utils/style.d.ts +0 -3
  85. package/utils/style.js +0 -13
  86. package/utils/types.d.ts +0 -234
  87. package/utils/types.js +0 -1
  88. package/utils/version.d.ts +0 -1
  89. package/utils/version.js +0 -1
  90. package/utils/wallet/EVMWalletStrategy.d.ts +0 -31
  91. package/utils/wallet/EVMWalletStrategy.js +0 -265
  92. package/utils/wallet/SolanaWalletStrategy.d.ts +0 -33
  93. package/utils/wallet/SolanaWalletStrategy.js +0 -293
  94. package/utils/wallet/WalletStrategy.d.ts +0 -61
  95. package/utils/wallet/WalletStrategy.js +0 -25
  96. package/utils/wallet/WalletStrategyFactory.d.ts +0 -15
  97. package/utils/wallet/WalletStrategyFactory.js +0 -31
  98. package/utils/wallet/index.d.ts +0 -4
  99. package/utils/wallet/index.js +0 -4
  100. package/utils/wallet-browser-event-types.d.ts +0 -116
  101. package/utils/wallet-browser-event-types.js +0 -17
package/jest.setup.ts ADDED
@@ -0,0 +1,4 @@
1
+ import { TextEncoder, TextDecoder } from 'util';
2
+
3
+ global.TextEncoder = TextEncoder;
4
+ global.TextDecoder = TextDecoder;
package/package.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "name": "@meshconnect/web-link-sdk",
3
- "version": "3.2.14",
3
+ "version": "3.2.15",
4
4
  "description": "A client-side JS library for integrating with Mesh Connect",
5
- "exports": "./index.js",
5
+ "main": "./src/index.ts",
6
+ "module": "./src/index.ts",
7
+ "exports": "./src/index.ts",
8
+ "types": "./src/index.ts",
9
+ "type": "module",
6
10
  "license": "MIT",
7
11
  "repository": "https://github.com/FrontFin/mesh-web-sdk.git",
8
12
  "homepage": "https://github.com/FrontFin/mesh-web-sdk",
@@ -22,12 +26,23 @@
22
26
  "util": "^0.12.4"
23
27
  },
24
28
  "dependencies": {
25
- "@meshconnect/node-api": "^2.0.22",
29
+ "@meshconnect/node-api": "^2.0.16",
26
30
  "@meshconnect/solana-web3.js": "^1.0.4",
27
31
  "bs58": "^5.0.0",
28
32
  "buffer": "^6.0.3",
29
33
  "ethers": "^6.11.1"
30
34
  },
35
+ "scripts": {
36
+ "build": "yarn updateVersion && rimraf dist && yarn build:esm && yarn copy",
37
+ "build:esm": "tsc --outDir dist",
38
+ "typecheck": "tsc --noEmit --skipLibCheck",
39
+ "lint": "eslint **/*.ts",
40
+ "copy": "node ./tools/copy",
41
+ "updateVersion": "node ./tools/update-version",
42
+ "publish:npm": "yarn build && cd dist && yarn publish --access public",
43
+ "test": "jest",
44
+ "test:cov": "jest --ci --coverage"
45
+ },
31
46
  "jest": {
32
47
  "preset": "ts-jest",
33
48
  "testEnvironment": "jsdom",
@@ -56,8 +71,5 @@
56
71
  "testEnvironmentOptions": {
57
72
  "url": "http://localhost/"
58
73
  }
59
- },
60
- "module": "./index.js",
61
- "main": "./index.js",
62
- "types": "./index.d.ts"
63
- }
74
+ }
75
+ }
@@ -0,0 +1,434 @@
1
+ import { createLink } from './Link'
2
+ import { DoneEvent, LinkEventType } from './utils/event-types'
3
+ import {
4
+ AccessTokenPayload,
5
+ DelayedAuthPayload,
6
+ EventType,
7
+ LinkPayload,
8
+ IntegrationAccessToken,
9
+ TransferFinishedPayload
10
+ } from './utils/types'
11
+
12
+ type EventPayload = {
13
+ type: EventType
14
+ payload?: AccessTokenPayload | DelayedAuthPayload | TransferFinishedPayload
15
+ message?: string
16
+ link?: string
17
+ }
18
+
19
+ const BASE64_ENCODED_URL = Buffer.from('http://localhost/1').toString('base64')
20
+
21
+ describe('createLink tests', () => {
22
+ window.open = jest.fn()
23
+
24
+ beforeEach(() => {
25
+ document.getElementsByTagName('html')[0].innerHTML = ''
26
+ })
27
+
28
+ test('createLink when invalid link provided should not open popup', () => {
29
+ const exitFunction = jest.fn<void, [string | undefined]>()
30
+ const frontConnection = createLink({
31
+ clientId: 'test',
32
+ onIntegrationConnected: jest.fn(),
33
+ onExit: exitFunction
34
+ })
35
+
36
+ frontConnection.openLink('')
37
+
38
+ expect(exitFunction).toHaveBeenCalledWith('Invalid link token!')
39
+ const iframeElement = document.getElementById('mesh-link-popup__iframe')
40
+ expect(iframeElement).toBeFalsy()
41
+ })
42
+
43
+ test('createLink when valid link provided should open popup', () => {
44
+ const frontConnection = createLink({
45
+ clientId: 'test',
46
+ onIntegrationConnected: jest.fn(),
47
+ language: 'en'
48
+ })
49
+
50
+ frontConnection.openLink(BASE64_ENCODED_URL)
51
+ const iframeElement = document.getElementById('mesh-link-popup__iframe')
52
+ expect(iframeElement).toBeTruthy()
53
+ expect(iframeElement?.attributes.getNamedItem('src')?.nodeValue).toBe(
54
+ 'http://localhost/1?lng=en'
55
+ )
56
+ })
57
+
58
+ test('createLink system language is requested then should open popup with correct language', () => {
59
+ jest.spyOn(navigator, 'language', 'get').mockReturnValue('es-US')
60
+
61
+ const frontConnection = createLink({
62
+ clientId: 'test',
63
+ onIntegrationConnected: jest.fn(),
64
+ language: 'system'
65
+ })
66
+
67
+ frontConnection.openLink(BASE64_ENCODED_URL)
68
+ const iframeElement = document.getElementById('mesh-link-popup__iframe')
69
+ expect(iframeElement).toBeTruthy()
70
+ expect(iframeElement?.attributes.getNamedItem('src')?.nodeValue).toBe(
71
+ 'http://localhost/1?lng=es-US'
72
+ )
73
+ })
74
+
75
+ test('createLink when valid link provided should open popup with custom iframe id', () => {
76
+ const customIframeId = 'custom-iframe-id'
77
+ const customIframeElement = document.createElement('iframe')
78
+ customIframeElement.id = customIframeId
79
+ document.body.appendChild(customIframeElement)
80
+
81
+ const frontConnection = createLink({
82
+ clientId: 'test',
83
+ onIntegrationConnected: jest.fn(),
84
+ language: 'en'
85
+ })
86
+
87
+ frontConnection.openLink(BASE64_ENCODED_URL, customIframeId)
88
+ const iframeElement = document.getElementById('mesh-link-popup__iframe')
89
+ expect(iframeElement).toBeFalsy()
90
+
91
+ expect(customIframeElement.attributes.getNamedItem('src')?.nodeValue).toBe(
92
+ 'http://localhost/1?lng=en'
93
+ )
94
+ })
95
+
96
+ test('createLink closePopup should close popup', () => {
97
+ const exitFunction = jest.fn<void, [string | undefined]>()
98
+ const frontConnection = createLink({
99
+ clientId: 'test',
100
+ onIntegrationConnected: jest.fn(),
101
+ onExit: exitFunction
102
+ })
103
+
104
+ frontConnection.openLink(BASE64_ENCODED_URL)
105
+ frontConnection.closeLink()
106
+
107
+ const iframeElement = document.getElementById('mesh-link-popup__iframe')
108
+ expect(iframeElement).toBeFalsy()
109
+
110
+ expect(exitFunction).toHaveBeenCalled()
111
+ })
112
+
113
+ test.each(['close', 'done'] as const)(
114
+ 'createLink "%s" event should close popup',
115
+ eventName => {
116
+ const exitFunction = jest.fn<void, [string | undefined]>()
117
+ const frontConnection = createLink({
118
+ clientId: 'test',
119
+ onIntegrationConnected: jest.fn(),
120
+ onExit: exitFunction
121
+ })
122
+
123
+ const payload: DoneEvent['payload'] = {
124
+ page: 'some page',
125
+ errorMessage: 'some msg'
126
+ }
127
+ frontConnection.openLink(BASE64_ENCODED_URL)
128
+ window.dispatchEvent(
129
+ new MessageEvent<LinkEventType>('message', {
130
+ data: {
131
+ type: eventName,
132
+ payload: payload
133
+ },
134
+ origin: 'http://localhost'
135
+ })
136
+ )
137
+
138
+ const iframeElement = document.getElementById('mesh-link-popup__iframe')
139
+ expect(iframeElement).toBeFalsy()
140
+
141
+ expect(exitFunction).toHaveBeenCalledWith('some msg', payload)
142
+ }
143
+ )
144
+
145
+ test('createLink "brokerageAccountAccessToken" event should send tokens', () => {
146
+ const onEventHandler = jest.fn<void, [LinkEventType]>()
147
+ const onBrokerConnectedHandler = jest.fn<void, [LinkPayload]>()
148
+ const frontConnection = createLink({
149
+ clientId: 'test',
150
+ onIntegrationConnected: onBrokerConnectedHandler,
151
+ onEvent: onEventHandler
152
+ })
153
+
154
+ frontConnection.openLink(BASE64_ENCODED_URL)
155
+
156
+ const payload: AccessTokenPayload = {
157
+ accountTokens: [],
158
+ brokerBrandInfo: { brokerLogo: '' },
159
+ brokerType: 'robinhood',
160
+ brokerName: 'R'
161
+ }
162
+ window.dispatchEvent(
163
+ new MessageEvent<EventPayload>('message', {
164
+ data: {
165
+ type: 'brokerageAccountAccessToken',
166
+ payload: payload
167
+ },
168
+ origin: 'http://localhost'
169
+ })
170
+ )
171
+
172
+ expect(onEventHandler).toHaveBeenCalledWith({
173
+ type: 'integrationConnected',
174
+ payload: { accessToken: payload }
175
+ })
176
+ expect(onBrokerConnectedHandler).toHaveBeenCalledWith({
177
+ accessToken: payload
178
+ })
179
+ })
180
+
181
+ test('createLink "delayedAuthentication" event should send dalayed tokens', () => {
182
+ const onEventHandler = jest.fn<void, [LinkEventType]>()
183
+ const onBrokerConnectedHandler = jest.fn<void, [LinkPayload]>()
184
+ const frontConnection = createLink({
185
+ clientId: 'test',
186
+ onIntegrationConnected: onBrokerConnectedHandler,
187
+ onEvent: onEventHandler
188
+ })
189
+
190
+ frontConnection.openLink(BASE64_ENCODED_URL)
191
+
192
+ const payload: DelayedAuthPayload = {
193
+ brokerBrandInfo: { brokerLogo: '' },
194
+ brokerType: 'robinhood',
195
+ brokerName: 'R',
196
+ refreshToken: 'rt'
197
+ }
198
+ window.dispatchEvent(
199
+ new MessageEvent<EventPayload>('message', {
200
+ data: {
201
+ type: 'delayedAuthentication',
202
+ payload: payload
203
+ },
204
+ origin: 'http://localhost'
205
+ })
206
+ )
207
+
208
+ expect(onEventHandler).toHaveBeenCalledWith({
209
+ type: 'integrationConnected',
210
+ payload: { delayedAuth: payload }
211
+ })
212
+ expect(onBrokerConnectedHandler).toHaveBeenCalledWith({
213
+ delayedAuth: payload
214
+ })
215
+ })
216
+
217
+ test('createLink "transferFinished" event should send transfer payload', () => {
218
+ const onEventHandler = jest.fn<void, [LinkEventType]>()
219
+ const onTransferFinishedHandler = jest.fn<void, [TransferFinishedPayload]>()
220
+ const frontConnection = createLink({
221
+ clientId: 'test',
222
+ onIntegrationConnected: jest.fn(),
223
+ onEvent: onEventHandler,
224
+ onTransferFinished: onTransferFinishedHandler
225
+ })
226
+
227
+ frontConnection.openLink(BASE64_ENCODED_URL)
228
+
229
+ const payload: TransferFinishedPayload = {
230
+ status: 'success',
231
+ txId: 'tid',
232
+ fromAddress: 'fa',
233
+ toAddress: 'ta',
234
+ symbol: 'BTC',
235
+ amount: 0.001,
236
+ networkId: 'nid',
237
+ amountInFiat: 9.77,
238
+ totalAmountInFiat: 10.02,
239
+ networkName: 'Bitcoin',
240
+ txHash: 'txHash',
241
+ transferId: 'trid'
242
+ }
243
+ window.dispatchEvent(
244
+ new MessageEvent<EventPayload>('message', {
245
+ data: {
246
+ type: 'transferFinished',
247
+ payload: payload
248
+ },
249
+ origin: 'http://localhost'
250
+ })
251
+ )
252
+
253
+ expect(onEventHandler).toHaveBeenCalledWith({
254
+ type: 'transferCompleted',
255
+ payload: payload
256
+ })
257
+ expect(onTransferFinishedHandler).toHaveBeenCalledWith(payload)
258
+ })
259
+
260
+ test('createLink "loaded" event should trigger the passing for tokens', () => {
261
+ const tokens: IntegrationAccessToken[] = [
262
+ {
263
+ accessToken: 'at',
264
+ accountId: 'aid',
265
+ accountName: 'an',
266
+ brokerType: 'acorns',
267
+ brokerName: 'A'
268
+ }
269
+ ]
270
+ const destinationTokens: IntegrationAccessToken[] = [
271
+ {
272
+ accessToken: 'ttoken',
273
+ accountId: 'tid',
274
+ accountName: 'tname',
275
+ brokerType: 'acorns',
276
+ brokerName: 'tbrokername'
277
+ }
278
+ ]
279
+ const frontConnection = createLink({
280
+ clientId: 'test',
281
+ onIntegrationConnected: jest.fn(),
282
+ accessTokens: tokens,
283
+ transferDestinationTokens: destinationTokens
284
+ })
285
+
286
+ frontConnection.openLink(BASE64_ENCODED_URL)
287
+
288
+ const iframeElement = document.getElementById(
289
+ 'mesh-link-popup__iframe'
290
+ ) as HTMLIFrameElement | null
291
+ expect(iframeElement?.contentWindow).toBeTruthy()
292
+
293
+ const postMessageSpy = jest.spyOn(
294
+ iframeElement?.contentWindow as Window,
295
+ 'postMessage'
296
+ )
297
+
298
+ window.dispatchEvent(
299
+ new MessageEvent<EventPayload>('message', {
300
+ data: {
301
+ type: 'loaded'
302
+ },
303
+ origin: 'http://localhost'
304
+ })
305
+ )
306
+
307
+ const packageJSONContent = JSON.parse(
308
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
309
+ require('fs').readFileSync('package.json', 'utf8')
310
+ )
311
+ expect(postMessageSpy).toHaveBeenCalledWith(
312
+ {
313
+ type: 'meshSDKSpecs',
314
+ payload: {
315
+ platform: 'web',
316
+ version: packageJSONContent.version,
317
+ origin: 'http://localhost'
318
+ }
319
+ },
320
+ 'http://localhost'
321
+ )
322
+
323
+ expect(postMessageSpy).toHaveBeenCalledWith(
324
+ { type: 'frontAccessTokens', payload: tokens },
325
+ 'http://localhost'
326
+ )
327
+
328
+ expect(postMessageSpy).toHaveBeenCalledWith(
329
+ { type: 'frontTransferDestinationTokens', payload: destinationTokens },
330
+ 'http://localhost'
331
+ )
332
+ })
333
+
334
+ test('createLink "integrationConnected" event should send event', () => {
335
+ const onEventHandler = jest.fn<void, [LinkEventType]>()
336
+ const frontConnection = createLink({
337
+ clientId: 'test',
338
+ onIntegrationConnected: jest.fn(),
339
+ onEvent: onEventHandler
340
+ })
341
+
342
+ frontConnection.openLink(BASE64_ENCODED_URL)
343
+
344
+ window.dispatchEvent(
345
+ new MessageEvent('message', {
346
+ data: {
347
+ type: 'integrationConnected'
348
+ },
349
+ origin: 'http://localhost'
350
+ })
351
+ )
352
+
353
+ expect(onEventHandler).toHaveBeenCalled()
354
+ })
355
+
356
+ test('createLink unknown event should not send any events', () => {
357
+ const onEventHandler = jest.fn<void, [LinkEventType]>()
358
+ const frontConnection = createLink({
359
+ clientId: 'test',
360
+ onIntegrationConnected: jest.fn(),
361
+ onEvent: onEventHandler
362
+ })
363
+
364
+ frontConnection.openLink(BASE64_ENCODED_URL)
365
+
366
+ window.dispatchEvent(
367
+ new MessageEvent('message', {
368
+ data: {
369
+ type: 'unknown'
370
+ },
371
+ origin: 'http://localhost'
372
+ })
373
+ )
374
+
375
+ expect(onEventHandler).not.toHaveBeenCalled()
376
+ })
377
+
378
+ test('createLink "brokerageAccountAccessToken" event should send tokens - used with openLink function', () => {
379
+ const onEventHandler = jest.fn<void, [LinkEventType]>()
380
+ const onBrokerConnectedHandler = jest.fn<void, [LinkPayload]>()
381
+ const frontConnection = createLink({
382
+ clientId: 'test',
383
+ onIntegrationConnected: onBrokerConnectedHandler,
384
+ onEvent: onEventHandler
385
+ })
386
+
387
+ frontConnection.openLink(
388
+ Buffer.from('http://localhost/1').toString('base64')
389
+ )
390
+
391
+ const payload: AccessTokenPayload = {
392
+ accountTokens: [],
393
+ brokerBrandInfo: { brokerLogo: '' },
394
+ brokerType: 'robinhood',
395
+ brokerName: 'R'
396
+ }
397
+ window.dispatchEvent(
398
+ new MessageEvent<EventPayload>('message', {
399
+ data: {
400
+ type: 'brokerageAccountAccessToken',
401
+ payload: payload
402
+ },
403
+ origin: 'http://localhost'
404
+ })
405
+ )
406
+
407
+ expect(onEventHandler).toHaveBeenCalledWith({
408
+ type: 'integrationConnected',
409
+ payload: { accessToken: payload }
410
+ })
411
+ expect(onBrokerConnectedHandler).toHaveBeenCalledWith({
412
+ accessToken: payload
413
+ })
414
+ })
415
+
416
+ test('createLink closeLink should close popup', () => {
417
+ const exitFunction = jest.fn<void, [string | undefined]>()
418
+ const frontConnection = createLink({
419
+ clientId: 'test',
420
+ onIntegrationConnected: jest.fn(),
421
+ onExit: exitFunction
422
+ })
423
+
424
+ frontConnection.openLink(
425
+ Buffer.from('http://localhost/1').toString('base64')
426
+ )
427
+ frontConnection.closeLink()
428
+
429
+ const iframeElement = document.getElementById('mesh-link-popup__iframe')
430
+ expect(iframeElement).toBeFalsy()
431
+
432
+ expect(exitFunction).toHaveBeenCalled()
433
+ })
434
+ })