Fixed test cases for phantomjs (must use ES3 syntax).

This commit is contained in:
Richard Moore 2018-10-13 17:27:19 -04:00
parent 5020897f10
commit e39cd84923
No known key found for this signature in database
GPG Key ID: 525F70A6FCABC295

@ -446,9 +446,9 @@ describe('Test Filters', function() {
// @TODO: Add a LOT more tests here
function doTest(test) {
it(test.name, function() {
let iface = new ethers.utils.Interface([ test.signature ]);
let eventDescription = iface.events[test.event];
let filter = eventDescription.encodeTopics(test.args);
var iface = new ethers.utils.Interface([ test.signature ]);
var eventDescription = iface.events[test.event];
var filter = eventDescription.encodeTopics(test.args);
assert.equal(filter.length, test.expected.length, 'filter length matches - ' + test.name);
filter.forEach(function(expected, index) {
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);
});
});