Merge pull request #490 from v0l/nostr-package-browser-tests
`nostr` package: get tests passing in the browser
This commit is contained in:
@ -36,7 +36,6 @@
|
||||
"throttle-debounce": "^5.0.0",
|
||||
"unist-util-visit": "^4.1.2",
|
||||
"use-long-press": "^2.0.3",
|
||||
"uuid": "^9.0.0",
|
||||
"workbox-background-sync": "^6.4.2",
|
||||
"workbox-broadcast-update": "^6.4.2",
|
||||
"workbox-cacheable-response": "^6.4.2",
|
||||
@ -85,7 +84,6 @@
|
||||
"@types/node": "^18.11.18",
|
||||
"@types/react": "^18.0.26",
|
||||
"@types/react-dom": "^18.0.10",
|
||||
"@types/uuid": "^9.0.0",
|
||||
"@types/webscopeio__react-textarea-autocomplete": "^4.7.2",
|
||||
"@types/webtorrent": "^0.109.3",
|
||||
"@webscopeio/react-textarea-autocomplete": "^4.9.2",
|
||||
|
@ -1,6 +1,10 @@
|
||||
import { Connection, RelaySettings } from "@snort/nostr";
|
||||
import { Connection } from "@snort/nostr";
|
||||
import { unixNow } from "Util";
|
||||
import { Query } from "./Query";
|
||||
import { getRandomValues } from "crypto";
|
||||
|
||||
window.crypto = {} as any;
|
||||
window.crypto.getRandomValues = getRandomValues as any;
|
||||
|
||||
describe("query", () => {
|
||||
test("progress", () => {
|
||||
@ -16,7 +20,7 @@ describe("query", () => {
|
||||
const opt = {
|
||||
read: true,
|
||||
write: true,
|
||||
} as RelaySettings;
|
||||
};
|
||||
const c1 = new Connection("wss://one.com", opt);
|
||||
c1.Down = false;
|
||||
const c2 = new Connection("wss://two.com", opt);
|
||||
|
Reference in New Issue
Block a user