forked from TrueFiEng/Waffle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b52fd1
commit 2b3c8f9
Showing
6 changed files
with
5,022 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"presets": [ | ||
"env", | ||
"stage-0" | ||
], | ||
"plugins": [ | ||
[ | ||
"transform-runtime", | ||
{ | ||
"polyfill": false, | ||
"regenerator": true | ||
} | ||
] | ||
], | ||
"env": { | ||
"test": { | ||
"sourceMaps": "inline", | ||
"retainLines": true | ||
} | ||
} | ||
} |
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,9 @@ | ||
node_modules | ||
dist | ||
.idea | ||
data | ||
/build/ | ||
yarn-error.log | ||
nodePrivateKey.json | ||
registryContractAddress.json | ||
/config/dev.json |
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,8 @@ | ||
import Ganache from 'ganache-core'; | ||
import Web3 from 'web3'; | ||
|
||
export async function createWeb3() { | ||
const web3 = new Web3(); | ||
web3.setProvider(Ganache.provider); | ||
return {web3}; | ||
} |
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,33 @@ | ||
{ | ||
"name": "Waffle", | ||
"description": "Sweeter and simpler than truffle.", | ||
"version": "0.0.1", | ||
"author": "Marek Kirejczyk, Ethworks", | ||
"repository": "[email protected]:EthWorks/Waffle.git", | ||
"private": true, | ||
"license": "MIT", | ||
"scripts": { | ||
"test": "export NODE_ENV=test && mocha --require babel-register --timeout 10000 --recursive --no-warnings" | ||
}, | ||
"engines": { | ||
"node": ">=9.0", | ||
"yarn": ">=1.3.2 <2.0.0" | ||
}, | ||
"dependencies": { | ||
"web3": "^1.0.0-beta.34" | ||
}, | ||
"devDependencies": { | ||
"babel-cli": "^6.26.0", | ||
"babel-core": "^6.26.3", | ||
"babel-eslint": "^8.2.3", | ||
"babel-plugin-transform-builtin-extend": "^1.1.2", | ||
"babel-plugin-transform-runtime": "^6.23.0", | ||
"babel-polyfill": "^6.26.0", | ||
"babel-preset-env": "^1.6.1", | ||
"babel-preset-stage-0": "^6.24.1", | ||
"chai": "^4.1.2", | ||
"chai-as-promised": "^7.1.1", | ||
"ganache-core": "^2.1.0", | ||
"mocha": "^5.1.1" | ||
} | ||
} |
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 @@ | ||
import chai from 'chai'; | ||
import chaiAsPromised from 'chai-as-promised'; | ||
import {createWeb3} from '../lib/waffle' | ||
|
||
chai.use(chaiAsPromised); | ||
|
||
const {expect} = chai; | ||
|
||
describe('Waffle', () => { | ||
let web3; | ||
|
||
beforeEach(async () => { | ||
({web3} = await createWeb3()); | ||
}); | ||
|
||
it('createWeb3', async () => { | ||
expect(web3.utils.randomHex(0)).to.eq('0x'); | ||
}); | ||
|
||
}); |
Oops, something went wrong.