From 3560762daffe644da2157b4e329a3f77bc45c986 Mon Sep 17 00:00:00 2001
From: Jono Wenger <jono@elixxir.io>
Date: Mon, 24 Oct 2022 09:33:26 -0700
Subject: [PATCH] Fix tests

---
 indexedDb/implementation_test.go    | 3 +++
 storage/indexedDbEncryptionTrack.go | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/indexedDb/implementation_test.go b/indexedDb/implementation_test.go
index 71d66c11..34a1d4fc 100644
--- a/indexedDb/implementation_test.go
+++ b/indexedDb/implementation_test.go
@@ -12,6 +12,7 @@ package indexedDb
 import (
 	"encoding/json"
 	"fmt"
+	"gitlab.com/elixxir/xxdk-wasm/storage"
 	"gitlab.com/xx_network/primitives/netTime"
 	"os"
 	"strconv"
@@ -90,6 +91,7 @@ func Test_wasmModel_UpdateSentStatus(t *testing.T) {
 
 // Smoke test wasmModel.JoinChannel/wasmModel.LeaveChannel happy paths.
 func Test_wasmModel_JoinChannel_LeaveChannel(t *testing.T) {
+	storage.GetLocalStorage().Clear()
 	eventModel, err := newWASMModel("test", nil, dummyCallback)
 	if err != nil {
 		t.Fatalf("%+v", err)
@@ -162,6 +164,7 @@ func Test_wasmModel_UUIDTest(t *testing.T) {
 
 // Tests if the same message ID being sent always returns the same UUID.
 func Test_wasmModel_DuplicateReceives(t *testing.T) {
+	storage.GetLocalStorage().Clear()
 	testString := "testHello"
 	eventModel, err := newWASMModel(testString, nil, dummyCallback)
 	if err != nil {
diff --git a/storage/indexedDbEncryptionTrack.go b/storage/indexedDbEncryptionTrack.go
index 757a7483..6e52a264 100644
--- a/storage/indexedDbEncryptionTrack.go
+++ b/storage/indexedDbEncryptionTrack.go
@@ -5,6 +5,8 @@
 // LICENSE file.                                                              //
 ////////////////////////////////////////////////////////////////////////////////
 
+//go:build js && wasm
+
 package storage
 
 import (
-- 
GitLab