Fixed PhantomJS test cases for new elliptic library.

This commit is contained in:
Richard Moore 2019-11-24 20:56:28 +09:00
parent 3e3048df81
commit 4ac08432b8
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651
5 changed files with 14 additions and 3 deletions

2
dist/shims.js vendored

File diff suppressed because one or more lines are too long

@ -110,4 +110,8 @@ function Reporter(runner) {
});
}
try {
window.ethersReporter = Reporter;
} catch (error) { }
module.exports = Reporter;

@ -59,6 +59,13 @@ if (!ArrayBuffer.isView) {
}
}
if (Array.prototype.fill == null) {
shims.push("Array.fill");
Array.prototype.fill = function(value) {
for (var i = 0; i < this.length; i++) { this[i] = value; }
}
}
// Shim nextTick
if (!global.nextTick) {
shims.push("nextTick");

@ -38,7 +38,7 @@
<!-- Run the test cases! -->
<script type="text/javascript">
mocha.reporter(tests.reporter);
mocha.reporter(ethersReporter);
// Use this to focus on specific test cases
//mocha.grep(new RegExp('easyseed')).run();

@ -1,7 +1,7 @@
var assert = require('assert');
function getEthers(filename) {
let ethers = require('../index');
var ethers = require('../index');
console.log('Loaded local ethers: ' + filename);
assert.equal(ethers.platform, 'node', 'platform: ' + ethers.platform + ' != "node"');
return ethers;