Added browser test harness.
This commit is contained in:
parent
90f27da293
commit
ebd9bbde2e
@ -101,6 +101,7 @@ module.exports = function(grunt) {
|
||||
'dist/ethers-providers.js': './providers/index.js',
|
||||
'dist/ethers-utils.js': './utils/index.js',
|
||||
'dist/ethers-wallet.js': './wallet/index.js',
|
||||
'dist/ethers-tests.js': './tests/browser.js',
|
||||
},
|
||||
options: {
|
||||
transform: [
|
||||
|
8
tests/browser.js
Normal file
8
tests/browser.js
Normal file
@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
"contract-interface": require('./run-contract-interface.js'),
|
||||
"hdnode": require('./run-hdnode.js'),
|
||||
"utils": require('./run-utils.js'),
|
||||
"wallet": require('./run-wallet.js'),
|
||||
};
|
21
tests/test.html
Normal file
21
tests/test.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Example Test Suite</title>
|
||||
<meta charset="UTF-8">
|
||||
<style type="text/css">
|
||||
ol {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
<script src="./node_modules/nodeunit/examples/browser/nodeunit.js"></script>
|
||||
<script src="../dist/ethers-tests.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1 id="nodeunit-header">Example Test Suite</h1>
|
||||
<script>
|
||||
nodeunit.run(ethers);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user