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
import md5 from 'md5'; | |
import { QueryConfig, QueryResult } from 'pg'; | |
import { IPGClient } from './interfaces'; | |
/** | |
* An NPM module for mocking a connection to a PostgreSQL database. | |
* @author Jason Favrod <[email protected]> | |
* @example | |
* ``` | |
* const PGMock2 = require('pgmock2'), |
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
Promise.resolve().then(() => { | |
console.log("Create a client and set the wallet location"); | |
client = new hfc(); | |
return hfc.newDefaultKeyValueStore({ path: options.wallet_path }); | |
}).then((wallet) => { | |
console.log("Set wallet path, and associate user ", options.user_id, " with application"); | |
client.setStateStore(wallet); | |
return client.getUserContext(options.user_id, true); | |
}).then((user) => { | |
console.log("Check user is enrolled, and set a query URL in the network"); |