Fixed test cases for phantomjs (must use ES3 syntax).
This commit is contained in:
parent
5020897f10
commit
e39cd84923
@ -446,9 +446,9 @@ describe('Test Filters', function() {
|
|||||||
// @TODO: Add a LOT more tests here
|
// @TODO: Add a LOT more tests here
|
||||||
function doTest(test) {
|
function doTest(test) {
|
||||||
it(test.name, function() {
|
it(test.name, function() {
|
||||||
let iface = new ethers.utils.Interface([ test.signature ]);
|
var iface = new ethers.utils.Interface([ test.signature ]);
|
||||||
let eventDescription = iface.events[test.event];
|
var eventDescription = iface.events[test.event];
|
||||||
let filter = eventDescription.encodeTopics(test.args);
|
var filter = eventDescription.encodeTopics(test.args);
|
||||||
assert.equal(filter.length, test.expected.length, 'filter length matches - ' + test.name);
|
assert.equal(filter.length, test.expected.length, 'filter length matches - ' + test.name);
|
||||||
filter.forEach(function(expected, index) {
|
filter.forEach(function(expected, index) {
|
||||||
assert.equal(expected, test.expected[index], 'signature topic matches - ' + index + ' - ' + test.name);
|
assert.equal(expected, test.expected[index], 'signature topic matches - ' + index + ' - ' + test.name);
|
||||||
@ -506,7 +506,7 @@ describe('Test Filters', function() {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
Tests.forEach((test) => {
|
Tests.forEach(function(test) {
|
||||||
doTest(test);
|
doTest(test);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user