mirror of
https://github.com/joinmarket-webui/jam.git
synced 2026-08-20 13:28:21 +02:00
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:
parent
224cd0e680
commit
ef2b829df0
5 changed files with 649 additions and 386 deletions
1018
package-lock.json
generated
1018
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
})
|
||||
})()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue