Skip to content
Snippets Groups Projects
Commit 3560762d authored by Jono Wenger's avatar Jono Wenger
Browse files

Fix tests

parent 62f2afab
No related branches found
No related tags found
3 merge requests!60Revert "Fail a test to be sure it works",!21added optional db encryption,!20Create JS bindings for ChannelDbCipher
...@@ -12,6 +12,7 @@ package indexedDb ...@@ -12,6 +12,7 @@ package indexedDb
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"gitlab.com/elixxir/xxdk-wasm/storage"
"gitlab.com/xx_network/primitives/netTime" "gitlab.com/xx_network/primitives/netTime"
"os" "os"
"strconv" "strconv"
...@@ -90,6 +91,7 @@ func Test_wasmModel_UpdateSentStatus(t *testing.T) { ...@@ -90,6 +91,7 @@ func Test_wasmModel_UpdateSentStatus(t *testing.T) {
// Smoke test wasmModel.JoinChannel/wasmModel.LeaveChannel happy paths. // Smoke test wasmModel.JoinChannel/wasmModel.LeaveChannel happy paths.
func Test_wasmModel_JoinChannel_LeaveChannel(t *testing.T) { func Test_wasmModel_JoinChannel_LeaveChannel(t *testing.T) {
storage.GetLocalStorage().Clear()
eventModel, err := newWASMModel("test", nil, dummyCallback) eventModel, err := newWASMModel("test", nil, dummyCallback)
if err != nil { if err != nil {
t.Fatalf("%+v", err) t.Fatalf("%+v", err)
...@@ -162,6 +164,7 @@ func Test_wasmModel_UUIDTest(t *testing.T) { ...@@ -162,6 +164,7 @@ func Test_wasmModel_UUIDTest(t *testing.T) {
// Tests if the same message ID being sent always returns the same UUID. // Tests if the same message ID being sent always returns the same UUID.
func Test_wasmModel_DuplicateReceives(t *testing.T) { func Test_wasmModel_DuplicateReceives(t *testing.T) {
storage.GetLocalStorage().Clear()
testString := "testHello" testString := "testHello"
eventModel, err := newWASMModel(testString, nil, dummyCallback) eventModel, err := newWASMModel(testString, nil, dummyCallback)
if err != nil { if err != nil {
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
// LICENSE file. // // LICENSE file. //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
//go:build js && wasm
package storage package storage
import ( import (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment