Skip to content

Commit

Permalink
fix: skip tests that require starting a process on js
Browse files Browse the repository at this point in the history
  • Loading branch information
linden committed Feb 18, 2024
1 parent e6f5a70 commit 6fba217
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions blockmanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"math/rand"
"reflect"
"runtime"
"strings"
"testing"
"time"
Expand Down Expand Up @@ -874,6 +875,12 @@ func TestBlockManagerDetectBadPeers(t *testing.T) {
func TestHandleHeaders(t *testing.T) {
t.Parallel()

// skip this test because we can't spawn a process in the browser.
// https://github.com/linden/wasmexec/issues/2.
if runtime.GOOS == "js" {
t.Skip("start process is unsupported in the browser, skipping test.")
}

// First, we set up a block manager and a fake peer that will act as the
// test's remote peer.
bm, _, _, err := setupBlockManager(t)
Expand Down
6 changes: 6 additions & 0 deletions sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,12 @@ func testRandomBlocks(harness *neutrinoHarness, t *testing.T) {
}

func TestNeutrinoSync(t *testing.T) {
// skip this test because we can't spawn a process in the browser.
// https://github.com/linden/wasmexec/issues/2.
if runtime.GOOS == "js" {
t.Skip("start process is unsupported in the browser, skipping test.")
}

// Set up logging.
logger := btclog.NewBackend(os.Stdout)
chainLogger := logger.Logger("CHAIN")
Expand Down

0 comments on commit 6fba217

Please sign in to comment.