Fixed PhantomJS test cases for new elliptic library.
This commit is contained in:
parent
3e3048df81
commit
4ac08432b8
2
dist/shims.js
vendored
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;
|
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
|
// Shim nextTick
|
||||||
if (!global.nextTick) {
|
if (!global.nextTick) {
|
||||||
shims.push("nextTick");
|
shims.push("nextTick");
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
<!-- Run the test cases! -->
|
<!-- Run the test cases! -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
mocha.reporter(tests.reporter);
|
mocha.reporter(ethersReporter);
|
||||||
|
|
||||||
// Use this to focus on specific test cases
|
// Use this to focus on specific test cases
|
||||||
//mocha.grep(new RegExp('easyseed')).run();
|
//mocha.grep(new RegExp('easyseed')).run();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
var assert = require('assert');
|
var assert = require('assert');
|
||||||
|
|
||||||
function getEthers(filename) {
|
function getEthers(filename) {
|
||||||
let ethers = require('../index');
|
var ethers = require('../index');
|
||||||
console.log('Loaded local ethers: ' + filename);
|
console.log('Loaded local ethers: ' + filename);
|
||||||
assert.equal(ethers.platform, 'node', 'platform: ' + ethers.platform + ' != "node"');
|
assert.equal(ethers.platform, 'node', 'platform: ' + ethers.platform + ' != "node"');
|
||||||
return ethers;
|
return ethers;
|
||||||
|
Loading…
Reference in New Issue
Block a user