ethers.js/tests/utils-ethers-browser.js

12 lines
333 B
JavaScript
Raw Permalink Normal View History

2018-07-23 03:02:39 -04:00
var assert = require('assert');
function getEthers(filename) {
var ethers = global.ethers
if (!ethers) { return undefined; }
console.log('Using global ethers; ' + filename);
2018-07-23 05:38:27 -04:00
assert.equal(ethers.platform, 'browser', 'platform: ' + ethers.platform + ' != "browser"');
2018-07-23 03:02:39 -04:00
return ethers;
}
module.exports = getEthers;