This commit is contained in:
poma 2020-10-02 12:55:44 +03:00
parent 8ed25df485
commit 60d34f8817
No known key found for this signature in database
GPG Key ID: BA20CB01FE165657
4 changed files with 32 additions and 29 deletions

View File

@ -7,24 +7,24 @@ on:
tags: [ 'v[0-9]+.[0-9]+.[0-9]+' ]
jobs:
# temporarily disabled
# test:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v1
# with:
# node-version: 14.7.0
# - run: yarn
# - run: yarn test
# - name: Telegram Failure Notification
# uses: appleboy/telegram-action@0.0.7
# if: failure()
# with:
# message: ❗ Build failed for [${{ github.repository }}](https://github.com/${{ github.repository }}/actions) because of ${{ github.actor }}
# format: markdown
# to: ${{ secrets.TELEGRAM_CHAT_ID }}
# token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
# temporarily disabled
# test:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v1
# with:
# node-version: 14.7.0
# - run: yarn
# - run: yarn test
# - name: Telegram Failure Notification
# uses: appleboy/telegram-action@0.0.7
# if: failure()
# with:
# message: ❗ Build failed for [${{ github.repository }}](https://github.com/${{ github.repository }}/actions) because of ${{ github.actor }}
# format: markdown
# to: ${{ secrets.TELEGRAM_CHAT_ID }}
# token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
lint:
runs-on: ubuntu-latest

View File

@ -4,7 +4,10 @@
"description": "",
"main": "index.js",
"scripts": {
"lint": "eslint .",
"eslint": "eslint --ext .js --ignore-path .gitignore .",
"prettier:check": "npx prettier --check . --config .prettierrc",
"prettier:fix": "npx prettier --write . --config .prettierrc",
"lint": "yarn eslint && yarn prettier:check",
"test": "mocha --timeout 300000"
},
"keywords": [],

View File

@ -1,7 +1,7 @@
/**
* A promise that resolves after `ms` milliseconds
*/
const sleep = (ms) => new Promise((res) => setTimeout(res, ms))
const sleep = ms => new Promise(res => setTimeout(res, ms))
/**
* A promise that resolves when the source emits specified event

View File

@ -32,9 +32,9 @@ describe('TxManager', () => {
const receipt = await tx
.send()
.on('transactionHash', (hash) => console.log('hash', hash))
.on('mined', (receipt) => console.log('Mined in block', receipt.blockNumber))
.on('confirmations', (confirmations) => console.log('confirmations', confirmations))
.on('transactionHash', hash => console.log('hash', hash))
.on('mined', receipt => console.log('Mined in block', receipt.blockNumber))
.on('confirmations', confirmations => console.log('confirmations', confirmations))
console.log('receipt', receipt)
})
@ -46,9 +46,9 @@ describe('TxManager', () => {
const receipt = await tx
.send()
.on('transactionHash', (hash) => console.log('hash', hash))
.on('mined', (receipt) => console.log('Mined in block', receipt.blockNumber))
.on('confirmations', (confirmations) => console.log('confirmations', confirmations))
.on('transactionHash', hash => console.log('hash', hash))
.on('mined', receipt => console.log('Mined in block', receipt.blockNumber))
.on('confirmations', confirmations => console.log('confirmations', confirmations))
console.log('receipt', receipt)
})
@ -60,9 +60,9 @@ describe('TxManager', () => {
const receipt = await tx
.send()
.on('transactionHash', (hash) => console.log('hash', hash))
.on('mined', (receipt) => console.log('Mined in block', receipt.blockNumber))
.on('confirmations', (confirmations) => console.log('confirmations', confirmations))
.on('transactionHash', hash => console.log('hash', hash))
.on('mined', receipt => console.log('Mined in block', receipt.blockNumber))
.on('confirmations', confirmations => console.log('confirmations', confirmations))
console.log('receipt', receipt)
})