build(deps): update dependencies (#699)

* build(deps): update jest-watch-typeahead from v0.6.5 to v2.2.2

* build(deps): update jest-websocket-mock to v2.5.0
This commit is contained in:
Thebora Kompanioni 2023-11-28 11:08:11 +01:00 committed by GitHub
parent 224cd0e680
commit ef2b829df0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 649 additions and 386 deletions

1018
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -22,8 +22,8 @@
"conventional-changelog": "^3.1.25",
"http-proxy-middleware": "^2.0.6",
"husky": "^8.0.1",
"jest-watch-typeahead": "^0.6.5",
"jest-websocket-mock": "^2.4.0",
"jest-watch-typeahead": "^2.2.2",
"jest-websocket-mock": "^2.5.0",
"lint-staged": "^13.0.3",
"prettier": "^3.0.3",
"react-scripts": "^5.0.1",

View file

@ -1,5 +1,4 @@
import { render, screen } from '../testUtils'
import { act } from 'react-dom/test-utils'
import { render, screen, act } from '../testUtils'
import user from '@testing-library/user-event'
import * as apiMock from '../libs/JmWalletApi'

View file

@ -1,5 +1,4 @@
import { createContext, useEffect, useState, useContext } from 'react'
import { useCurrentWallet } from './WalletContext'
import { noop } from '../utils'
import { isDevMode } from '../constants/debugFeatures'
@ -30,7 +29,8 @@ const logToDebugConsoleInDevMode = isDevMode() ? console.debug : noop
const createWebSocket = () => {
const { protocol, host } = window.location
const scheme = protocol === 'https:' ? 'wss' : 'ws'
const websocket = new WebSocket(`${scheme}://${host}${WEBSOCKET_ENDPOINT_PATH}`)
const url = `${scheme}://${host}${WEBSOCKET_ENDPOINT_PATH}`
const websocket = new WebSocket(url)
websocket.onerror = (error) => {
console.error('[Websocket] error', error)

View file

@ -25,13 +25,9 @@ global.__DEV__.addToAppSettings = () => {
;(function setupWebsocketServerMock() {
global.__DEV__.JM_WEBSOCKET_SERVER_MOCK = new WebSocketServer('ws://localhost/jmws', { jsonProtocol: true })
afterEach(() => {
// gracefully close all open connections and reset the environment between test runs
WebSocketServer.clean()
})
afterAll(() => {
global.__DEV__.JM_WEBSOCKET_SERVER_MOCK.close()
WebSocketServer.clean()
})
})()