-
Notifications
You must be signed in to change notification settings - Fork 47
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
877edfc
commit 2a55c6d
Showing
5 changed files
with
187 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,12 +19,13 @@ | |
"format": "prettier --write \"src/**/*.ts\"", | ||
"test": "yarn test:node && yarn test:browser", | ||
"test:node": "yarn proto && yarn abi && tsc && tape dist/tests/unit_tests.js | tap-spec", | ||
"test:browser": "yarn proto && yarn abi && tsc && webpack --config webpack.unit.tests.config.js | tap-spec", | ||
"test:browser": "yarn proto && yarn abi && tsc && webpack --config webpack.unit.tests.config.js | yarn puppeteer-run ./dist/browser_unit_tests.js | tap-spec", | ||
"test:e2e:local": "bash e2e_tests.sh", | ||
"e2e:node": "yarn proto && yarn abi && tsc && tape -r dotenv/config dotenv_config_path=./.env.test dist/tests/e2e_tests.js | tap-spec", | ||
"e2e:browser": "yarn proto && yarn abi && tsc && webpack --config webpack.e2e.test.config.js | tap-spec", | ||
"proto": "node ./scripts/gen-proto.js", | ||
"abi": "node ./scripts/abi.js && bash ./scripts/fix_types.sh", | ||
"puppeteer-run": "node ./scripts/puppeteer-run.js", | ||
"copy-contracts": "node ./scripts/copy-contracts.js", | ||
"prepublish": "yarn proto && yarn abi && yarn build && webpack" | ||
}, | ||
|
@@ -39,7 +40,9 @@ | |
"ethereumjs-util": "^5.2.0", | ||
"ethers": "^4.0.9", | ||
"google-protobuf": "3.6", | ||
"karma-phantomjs-launcher": "^1.0.4", | ||
"lodash": "^4.17.11", | ||
"phantomjs-prebuilt": "^2.1.16", | ||
"retry": "^0.12.0", | ||
"ripemd160": "^2.0.1", | ||
"rlp": "^2.1.0", | ||
|
@@ -73,6 +76,8 @@ | |
"shelljs": "^0.8.2", | ||
"tap-spec": "^5.0.0", | ||
"tape": "4.9", | ||
"tape-puppet": "git+https://[email protected]/eduardonunesp/tape-puppet.git#9c1ed208391957de40e90962e89730417be1a30e", | ||
"ts-protoc-gen": "^", | ||
"ts-protoc-gen": "^0.6.0", | ||
"tslint": "^5.9.1", | ||
"tslint-config-prettier": "^1.12.0", | ||
|
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,23 @@ | ||
const { readFileSync } = require('fs') | ||
const puppeteer = require('puppeteer') | ||
|
||
const file = readFileSync(process.argv[2], 'utf-8') | ||
|
||
const html = ` | ||
<html> | ||
<script> | ||
${file} | ||
</script> | ||
</html> | ||
` | ||
;(async () => { | ||
const browser = await puppeteer.launch() | ||
const page = await browser.newPage() | ||
page.setContent(html) | ||
|
||
page.on('console', msg => console.log(msg.text())) | ||
|
||
await page.waitFor(2000) | ||
|
||
await browser.close() | ||
})() |
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
Oops, something went wrong.