Skip to content

Commit 065023a

Browse files
committed
test: add failing js reset-leak test (#159)
Drives the js runtime through the shared assertResetDoesNotLeak helper.
1 parent 0f47f0b commit 065023a

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// This Source Code Form is subject to the terms of the Mozilla Public
2+
// License, v. 2.0. If a copy of the MPL was not distributed with this
3+
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
4+
5+
//go:build js
6+
7+
package tests
8+
9+
import (
10+
"testing"
11+
12+
"github.com/sourcenetwork/lens/host-go/runtimes/js"
13+
)
14+
15+
// TestJsResetDoesNotLeakMemory asserts the js runtime does not leak wasm linear
16+
// memory across Reset cycles (issue #159).
17+
func TestJsResetDoesNotLeakMemory(t *testing.T) {
18+
assertResetDoesNotLeak(t, js.New())
19+
}

0 commit comments

Comments
 (0)