commit 11b9062865cc7bef42c533c67e7201c10f3cf6df
parent 5c5b55bf673b3fe88c75fecb6a42c1ced2cbdd43
Author: William Casarin <jb55@jb55.com>
Date: Wed, 19 Jul 2023 10:04:11 -0700
test: fix some warnings
Diffstat:
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/damusTests/EventGroupViewTests.swift b/damusTests/EventGroupViewTests.swift
@@ -48,7 +48,6 @@ final class EventGroupViewTests: XCTestCase {
let repost2 = NostrEvent(id: "", content: encodedPost, pubkey: "pk2", kind: NostrKind.boost.rawValue, tags: [], createdAt: 1)
let repost3 = NostrEvent(id: "", content: encodedPost, pubkey: "pk3", kind: NostrKind.boost.rawValue, tags: [], createdAt: 1)
- let nozaps = true
XCTAssertEqual(reacting_to_text(profiles: damusState.profiles, our_pubkey: damusState.pubkey, group: .repost(EventGroup(events: [])), ev: test_event, pubkeys: [], locale: enUsLocale), "??")
XCTAssertEqual(reacting_to_text(profiles: damusState.profiles, our_pubkey: damusState.pubkey, group: .repost(EventGroup(events: [repost1])), ev: test_event, pubkeys: ["pk1"], locale: enUsLocale), "pk1:pk1 reposted a note you were tagged in")
XCTAssertEqual(reacting_to_text(profiles: damusState.profiles, our_pubkey: damusState.pubkey, group: .repost(EventGroup(events: [repost1, repost2])), ev: test_event, pubkeys: ["pk1", "pk2"], locale: enUsLocale), "pk1:pk1 and pk2:pk2 reposted a note you were tagged in")
diff --git a/damusTests/NostrScriptTests.swift b/damusTests/NostrScriptTests.swift
@@ -36,7 +36,7 @@ final class NostrScriptTests: XCTestCase {
}
func test_bool_set() throws {
- var data = try load_bool_set_test_wasm().bytes
+ let data = try load_bool_set_test_wasm().bytes
let pool = RelayPool()
let script = NostrScript(pool: pool, data: data)
let pk = "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"
@@ -60,7 +60,7 @@ final class NostrScriptTests: XCTestCase {
}
func test_nostrscript() throws {
- var data = try loadTestWasm().bytes
+ let data = try loadTestWasm().bytes
let pool = RelayPool()
let script = NostrScript(pool: pool, data: data)
diff --git a/damusTests/UserSearchCacheTests.swift b/damusTests/UserSearchCacheTests.swift
@@ -51,7 +51,7 @@ final class UserSearchCacheTests: XCTestCase {
let keypair = try XCTUnwrap(keypair)
let newNip05 = "_@other.xyz"
- let validatedNewNip05 = try XCTUnwrap(NIP05.parse(newNip05))
+ _ = try XCTUnwrap(NIP05.parse(newNip05))
damusState.profiles.set_validated(keypair.pubkey, nip05: NIP05.parse(newNip05))