Comments (5)
API has changed, and have adapted unit test code to adapt to these web3.js breaking changes.
from atomicswap.
Just fixed Go tests.
Truffle tests do work on my machine:
truffle test
Compiling ./contracts/AtomicSwap.sol...
Compiling ./contracts/Migrations.sol...
Contract: AtomicSwap tests
balance of accounts before test:
* balance of account #1: 100000000000000000000
* balance of account #2: 100000000000000000000
* balance of account #3: 100000000000000000000
* balance of account #4: 100000000000000000000
✓ should be able to redeem a participation contract (1351ms)
balance of accounts after test:
* balance of account #1: 99990000000000000000
* balance of account #2: 100010000000000000000
* balance of account #3: 100000000000000000000
* balance of account #4: 100000000000000000000
balance of accounts before test:
* balance of account #1: 99990000000000000000
* balance of account #2: 100010000000000000000
* balance of account #3: 100000000000000000000
* balance of account #4: 100000000000000000000
✓ should be able to redeem a participation contract even when refunding is already possible (3026ms)
balance of accounts after test:
* balance of account #1: 99980000000000000000
* balance of account #2: 100020000000000000000
* balance of account #3: 100000000000000000000
* balance of account #4: 100000000000000000000
balance of accounts before test:
* balance of account #1: 99980000000000000000
* balance of account #2: 100020000000000000000
* balance of account #3: 100000000000000000000
* balance of account #4: 100000000000000000000
✓ should be able to redeem an initiation contract (1250ms)
balance of accounts after test:
* balance of account #1: 99970000000000000000
* balance of account #2: 100030000000000000000
* balance of account #3: 100000000000000000000
* balance of account #4: 100000000000000000000
balance of accounts before test:
* balance of account #1: 99970000000000000000
* balance of account #2: 100030000000000000000
* balance of account #3: 100000000000000000000
* balance of account #4: 100000000000000000000
✓ should be able to redeem an initiation contract even when refunding is already possible (3030ms)
balance of accounts after test:
* balance of account #1: 99960000000000000000
* balance of account #2: 100040000000000000000
* balance of account #3: 100000000000000000000
* balance of account #4: 100000000000000000000
balance of accounts before test:
* balance of account #1: 99960000000000000000
* balance of account #2: 100040000000000000000
* balance of account #3: 100000000000000000000
* balance of account #4: 100000000000000000000
✓ should be able to refund a participation contract (4347ms)
balance of accounts after test:
* balance of account #1: 99960000000000000000
* balance of account #2: 100040000000000000000
* balance of account #3: 100000000000000000000
* balance of account #4: 100000000000000000000
balance of accounts before test:
* balance of account #1: 99960000000000000000
* balance of account #2: 100040000000000000000
* balance of account #3: 100000000000000000000
* balance of account #4: 100000000000000000000
✓ should be able to refund an initiation contract (3967ms)
balance of accounts after test:
* balance of account #1: 99960000000000000000
* balance of account #2: 100040000000000000000
* balance of account #3: 100000000000000000000
* balance of account #4: 100000000000000000000
balance of accounts before test:
* balance of account #1: 99960000000000000000
* balance of account #2: 100040000000000000000
* balance of account #3: 100000000000000000000
* balance of account #4: 100000000000000000000
✓ shouldn't be possible to create a contract with no value
balance of accounts after test:
* balance of account #1: 99960000000000000000
* balance of account #2: 100040000000000000000
* balance of account #3: 100000000000000000000
* balance of account #4: 100000000000000000000
balance of accounts before test:
* balance of account #1: 99960000000000000000
* balance of account #2: 100040000000000000000
* balance of account #3: 100000000000000000000
* balance of account #4: 100000000000000000000
✓ shouldn't be possible to create a contract with no refundTime
balance of accounts after test:
* balance of account #1: 99960000000000000000
* balance of account #2: 100040000000000000000
* balance of account #3: 100000000000000000000
* balance of account #4: 100000000000000000000
8 passing (25s)
I have Truffle v4.1.12
, going to see to upgrade, as I think it has to do with a new version.
from atomicswap.
After running npm update -g truffle
I now have
truffle --version
Truffle v4.1.16
Unit tests still run fine locally...
from atomicswap.
Going to ensure I have same node versions...
from atomicswap.
Ok found it, need latest version of truffle:
truffle --version
Truffle v5.0.38 - a development framework for Ethereum
from atomicswap.
Related Issues (11)
- Error when broadcasting a btc transaction HOT 1
- Add Stellar XLM HOT 1
- investigate atomic swaps with digibyte
- finish golint PR in decred/atomicswap HOT 2
- set correct labels HOT 2
- provide documentation for ethatomicswap
- Add Stellar based assets atomic swaps HOT 1
- Set correct issuelabels for this repo
- Travis build is failing HOT 4
- gometalinter is deprecated HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atomicswap.