Skip to content

Commit 4a6ac87

Browse files
OttoAllmendingerllm-git
andcommitted
fix(test): move assertion inside derivable check
Moves the assertion that checks `.atDerivationIndex(0)` doesn't throw inside the conditional block that verifies the descriptor is derivable. The new rust-miniscript version fails at the `.atDerivationIndex(0)` call which frankly makes more sense. Issue: BTC-2650 Co-authored-by: llm-git <[email protected]>
1 parent 483b987 commit 4a6ac87

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/wasm-utxo/test/test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ describe("Descriptor fixtures", function () {
9999
it("should parse (pkType derivable)", async function () {
100100
const descriptor = Descriptor.fromString(fixture.descriptor, "derivable");
101101

102-
assert.doesNotThrow(() =>
103-
Descriptor.fromString(fixture.descriptor, "derivable").atDerivationIndex(0),
104-
);
105-
106102
if (isDerivable(i)) {
103+
assert.doesNotThrow(() =>
104+
Descriptor.fromString(fixture.descriptor, "derivable").atDerivationIndex(0),
105+
);
106+
107107
if (descriptor.descType() !== "Tr") {
108108
assert.doesNotThrow(() => descriptor.atDerivationIndex(0).encode());
109109
}

0 commit comments

Comments
 (0)