Skip to content

Commit aba71d3

Browse files
author
Beau Shinkle
committed
Add test index hinting for leaf test failures
1 parent 1f3d993 commit aba71d3

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

test/leafTest.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ describe("Leaf", () => {
5656
test.creationBlock,
5757
test.id,
5858
)
59-
expect(leaf).to.equal(test.expectation)
59+
expect(leaf).to.equal(
60+
test.expectation,
61+
`unexpected result for text index ${i}`,
62+
)
6063
}
6164
})
6265
})
@@ -87,7 +90,10 @@ describe("Leaf", () => {
8790
for (let i = 0; i < testData.length; i++) {
8891
const test = testData[i]
8992
const operator = await leafInstance.operator(BigNumber.from(test.leaf))
90-
expect(operator).to.equal(test.operator)
93+
expect(operator).to.equal(
94+
test.operator,
95+
`unexpected result for text index ${i}`,
96+
)
9197
}
9298
})
9399
})
@@ -120,7 +126,10 @@ describe("Leaf", () => {
120126
const creationBlock = await leafInstance.creationBlock(
121127
BigNumber.from(test.leaf),
122128
)
123-
expect(creationBlock).to.equal(test.creationBlock)
129+
expect(creationBlock).to.equal(
130+
test.creationBlock,
131+
`unexpected result for text index ${i}`,
132+
)
124133
}
125134
})
126135
})
@@ -150,7 +159,10 @@ describe("Leaf", () => {
150159
for (let i = 0; i < testData.length; i++) {
151160
const test = testData[i]
152161
const id = await leafInstance.id(BigNumber.from(test.leaf))
153-
expect(id).to.equal(parseInt(test.id, 16))
162+
expect(id).to.equal(
163+
parseInt(test.id, 16),
164+
`unexpected result for text index ${i}`,
165+
)
154166
}
155167
})
156168
})

0 commit comments

Comments
 (0)