|
|
|
@ -13,7 +13,7 @@ describe('Misc', () => { |
|
|
|
|
|
|
|
|
|
describe('web3_clientVersion', () => { |
|
|
|
|
it('should get correct remix simulator version', async () => { |
|
|
|
|
web3['_requestManager'].send({ method: 'web3_clientVersion', params: [] }) |
|
|
|
|
web3['_requestManager'].send({ method: 'web3_clientVersion', params: []}) |
|
|
|
|
.then(version => { |
|
|
|
|
const remixVersion = require('../package.json').version |
|
|
|
|
assert.equal(version, 'Remix Simulator/' + remixVersion) |
|
|
|
@ -24,7 +24,7 @@ describe('Misc', () => { |
|
|
|
|
|
|
|
|
|
describe('eth_protocolVersion', () => { |
|
|
|
|
it('should get protocol version', async () => { |
|
|
|
|
web3['_requestManager'].send({ method: 'eth_protocolVersion', params: [] }) |
|
|
|
|
web3['_requestManager'].send({ method: 'eth_protocolVersion', params: []}) |
|
|
|
|
.then(result => assert.equal(result, '0x3f')) |
|
|
|
|
.catch(err => { throw new Error(err) }) |
|
|
|
|
}) |
|
|
|
@ -53,7 +53,7 @@ describe('Misc', () => { |
|
|
|
|
|
|
|
|
|
describe('web3_sha3', () => { |
|
|
|
|
it('should get result of a sha3', async () => { |
|
|
|
|
web3['_requestManager'].send({ method: 'web3_sha3', params: ['0x68656c6c6f20776f726c64'] }) |
|
|
|
|
web3['_requestManager'].send({ method: 'web3_sha3', params: ['0x68656c6c6f20776f726c64']}) |
|
|
|
|
.then(result => assert.equal(result, '0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad')) |
|
|
|
|
.catch(err => { throw new Error(err)} ) |
|
|
|
|
}) |
|
|
|
@ -61,7 +61,7 @@ describe('Misc', () => { |
|
|
|
|
|
|
|
|
|
describe('eth_getCompilers', () => { |
|
|
|
|
it('should get list of compilers', async () => { |
|
|
|
|
web3['_requestManager'].send({ method: 'eth_getCompilers', params: [] }) |
|
|
|
|
web3['_requestManager'].send({ method: 'eth_getCompilers', params: []}) |
|
|
|
|
.then(result => assert.equal(result, 0)) |
|
|
|
|
.catch(err => { throw new Error(err) }) |
|
|
|
|
}) |
|
|
|
@ -69,7 +69,7 @@ describe('Misc', () => { |
|
|
|
|
|
|
|
|
|
describe('eth_compileSolidity', () => { |
|
|
|
|
it('get unsupported result when requesting solidity compiler', async () => { |
|
|
|
|
web3['_requestManager'].send({ method: 'eth_compileSolidity', params: [] }) |
|
|
|
|
web3['_requestManager'].send({ method: 'eth_compileSolidity', params: []}) |
|
|
|
|
.then(result => assert.equal(result, 'unsupported')) |
|
|
|
|
.catch(err => { throw new Error(err) }) |
|
|
|
|
}) |
|
|
|
@ -77,7 +77,7 @@ describe('Misc', () => { |
|
|
|
|
|
|
|
|
|
describe('eth_compileLLL', () => { |
|
|
|
|
it('get unsupported result when requesting LLL compiler', async () => { |
|
|
|
|
web3['_requestManager'].send({ method: 'eth_compileLLL', params: [] }) |
|
|
|
|
web3['_requestManager'].send({ method: 'eth_compileLLL', params: []}) |
|
|
|
|
.then(result => assert.equal(result, 'unsupported')) |
|
|
|
|
.catch(err => { throw new Error(err) }) |
|
|
|
|
}) |
|
|
|
@ -85,7 +85,7 @@ describe('Misc', () => { |
|
|
|
|
|
|
|
|
|
describe('eth_compileSerpent', () => { |
|
|
|
|
it('get unsupported result when requesting serpent compiler', async () => { |
|
|
|
|
web3['_requestManager'].send({ method: 'eth_compileSerpent', params: [] }) |
|
|
|
|
web3['_requestManager'].send({ method: 'eth_compileSerpent', params: []}) |
|
|
|
|
.then(result => assert.equal(result, 'unsupported')) |
|
|
|
|
.catch(err => { throw new Error(err)} ) |
|
|
|
|
}) |
|
|
|
|