Skip to content

Commit

Permalink
chrome(Test): enable all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nduchak committed Oct 1, 2019
1 parent 0ff8c5f commit 9055497
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/integration/contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import * as R from 'ramda'
const identityContract = `
contract Identity =
record state = { a: int }
entrypoint init() = { a = 1 }
entrypoint main(x : int) = x
`
const stateContract = `
Expand Down Expand Up @@ -95,13 +96,13 @@ contract StateContract =
entrypoint datTypeFn(s: dateUnit): dateUnit = s
`

const encodedNumberSix = 'cb_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaKNdnK'
const encodedNumberSix = 'cb_DA6sWJo='
const filesystem = {
testLib: libContract
}
plan('1000000000000000000000')

describe.only('Contract', function () {
describe('Contract', function () {
configure(this)

let contract
Expand All @@ -113,7 +114,8 @@ describe.only('Contract', function () {
})

it('precompiled bytecode can be deployed', async () => {
console.log(contract.getNodeInfo())
const { version, consensusProtocol } = contract.getNodeInfo()
console.log(`Node => ${version}, consensus => ${consensusProtocol}, compiler => ${contract.compilerVersion}`)
const code = await contract.contractCompile(identityContract)
return contract.contractDeploy(code.bytecode, identityContract).should.eventually.have.property('address')
})
Expand Down Expand Up @@ -198,7 +200,7 @@ describe.only('Contract', function () {
try {
await contract.contractCompile(contractWithLib)
} catch (e) {
e.message.indexOf('could not find include file').should.not.be.equal(-1)
e.message.indexOf('Couldn\'t find include file').should.not.be.equal(-1)
}
})
it('Can deploy contract with external deps', async () => {
Expand Down Expand Up @@ -247,7 +249,7 @@ describe.only('Contract', function () {
isString.should.be.equal(true)
})
it('decode call-data', async () => {
return contract.contractDecodeCallResultAPI(identityContract, 'main', encodedNumberSix, 'ok').should.eventually.become(6)
return contract.contractDecodeCallResultAPI(identityContract, 'main', encodedNumberSix, 'ok', { backend: 'fate' }).should.eventually.become(6)
})
it('Use invalid compiler url', async () => {
try {
Expand Down

0 comments on commit 9055497

Please sign in to comment.