This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 680
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'issue_300' of https://github.com/sogoiii/testrpc into s…
…ogoiii-issue_300
- Loading branch information
Showing
5 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
var Web3 = require('web3'); | ||
var assert = require('assert'); | ||
var TestRPC = require("../index.js"); | ||
|
||
|
||
describe("Ethereum", function(done) { | ||
var web3 = new Web3(); | ||
var provider; | ||
|
||
before("Initialize the provider", function() { | ||
provider = TestRPC.provider(); | ||
web3.setProvider(provider); | ||
}); | ||
|
||
it("should get ethereum version (eth_protocolVersion)", function(done) { | ||
web3.version.getEthereum(function(err, result){ | ||
assert.equal(result, "63", "Network Version should be 63"); | ||
done(); | ||
}) | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
var Web3 = require('web3'); | ||
var assert = require('assert'); | ||
var TestRPC = require("../index.js"); | ||
|
||
describe("Swarm", function(done) { | ||
var web3 = new Web3(); | ||
var provider; | ||
|
||
before("Initialize the provider", function() { | ||
provider = TestRPC.provider(); | ||
web3.setProvider(provider); | ||
}); | ||
|
||
it.skip("should get swarm info (bzz_info)", function(done) { | ||
web3.bzz.getInfo(function(err, result){ | ||
assert.isArray(result, "Stub returns empty array") | ||
done(); | ||
}) | ||
}); | ||
|
||
it.skip("should get swarm hive (bzz_hive)", function(done) { | ||
web3.bzz.getHive(function(err, result){ | ||
assert.isArray(result, "Stub returns empty array") | ||
done(); | ||
}) | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
var Web3 = require('web3'); | ||
var assert = require('assert'); | ||
var TestRPC = require("../index.js"); | ||
|
||
describe("Whisper", function(done) { | ||
var web3 = new Web3(); | ||
var provider; | ||
|
||
before("Initialize the provider", function() { | ||
provider = TestRPC.provider(); | ||
web3.setProvider(provider); | ||
}); | ||
|
||
it("should call get whisper version (shh_version)", function(done) { | ||
web3.version.getWhisper(function(err, result){ | ||
assert.equal(result, "2", "Whisper version should be 2"); | ||
done(); | ||
}) | ||
}); | ||
}); |