mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
initial integration test scaffolding
This commit is contained in:
parent
501a67c025
commit
e46ef174a2
17
integration/config.ts
Normal file
17
integration/config.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import * as HDWalletProvider from "truffle-hdwallet-provider"
|
||||
import { Config } from "../src"
|
||||
import * as configJson from "./config/config.json"
|
||||
|
||||
if (process.env.SEED_WORDS) {
|
||||
const seedphrase = process.env.SEED_WORDS
|
||||
|
||||
// @ts-ignore
|
||||
configJson.web3Provider = new HDWalletProvider(
|
||||
seedphrase,
|
||||
configJson.nodeUri,
|
||||
0,
|
||||
2,
|
||||
)
|
||||
}
|
||||
|
||||
export const config = configJson as Config
|
11
integration/config/config.json
Normal file
11
integration/config/config.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"nodeUri": "http://localhost:8545",
|
||||
"aquariusUri": "https://nginx-aquarius.dev-ocean.com",
|
||||
"brizoUri": "http://localhost:8030",
|
||||
"parityUri": "http://localhost:9545",
|
||||
"secretStoreUri": "http://localhost:12001",
|
||||
"threshold": 0,
|
||||
"password": "secret",
|
||||
"address": "0xa99d43d86a0758d5632313b8fa3972b6088a21bb",
|
||||
"verbose": false
|
||||
}
|
6
integration/mocha.opts
Normal file
6
integration/mocha.opts
Normal file
@ -0,0 +1,6 @@
|
||||
--require ts-node/register
|
||||
--require source-map-support/register
|
||||
--full-trace
|
||||
--exit
|
||||
--timeout 300000
|
||||
integration/**/*.test.ts
|
10
integration/tsconfig.json
Normal file
10
integration/tsconfig.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"resolveJsonModule": true,
|
||||
"lib": [
|
||||
"es6",
|
||||
"es7"
|
||||
],
|
||||
"noUnusedLocals": true
|
||||
}
|
||||
}
|
@ -7,8 +7,11 @@
|
||||
"scripts": {
|
||||
"test": "mocha",
|
||||
"test:watch": "mocha -w --watch-extensions js,ts,json",
|
||||
"test:cover": "nyc mocha",
|
||||
"integration": "./src/examples/fire_lazers.sh",
|
||||
"test:cover": "nyc --report-dir coverage/unit mocha",
|
||||
"integration": "mocha --opts integration/mocha.opts",
|
||||
"integration:watch": "mocha -w --watch-extensions js,ts,json --opts integration/mocha.opts",
|
||||
"integration:cover": "nyc --report-dir coverage/integration mocha --opts integration/mocha.opts",
|
||||
"examples": "./src/examples/fire_lazers.sh",
|
||||
"clean": "rm -rf ./dist/ ./doc/ ./coverage ./.nyc_output",
|
||||
"lint": "tslint -c tslint.json 'src/**/*.ts' 'test/**/*.ts'",
|
||||
"start": "npm link @oceanprotocol/keeper-contracts @oceanprotocol/secret-store-client && npm run build:watch",
|
||||
@ -17,7 +20,7 @@
|
||||
"build:dist": "cross-env NODE_ENV=production webpack",
|
||||
"build:watch": "tsc -w",
|
||||
"doc": "typedoc --mode modules --out ./doc/ ./src/",
|
||||
"report-coverage": "cat ./coverage/lcov.info | codacy-coverage --token 71ef0d15f6f04ac29b31d704b28f866a",
|
||||
"report-coverage": "cat ./coverage/unit/lcov.info | codacy-coverage --token 71ef0d15f6f04ac29b31d704b28f866a",
|
||||
"run": "ts-node",
|
||||
"release": "./node_modules/release-it/bin/release-it.js --src.tagName='v%s' --github.release --npm.publish --non-interactive",
|
||||
"release-minor": "./node_modules/release-it/bin/release-it.js minor --src.tagName='v%s' --github.release --npm.publish --non-interactive",
|
||||
|
1
src/index.ts
Normal file
1
src/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './squid'
|
@ -128,7 +128,7 @@ export default class Ocean {
|
||||
did: string,
|
||||
serviceDefinitionId: string,
|
||||
consumer: Account,
|
||||
): Promise<any> {
|
||||
) {
|
||||
return await this.assets.order(did, serviceDefinitionId, consumer)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user