
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
@waves/js-test-env
Advanced tools
Import package and write typescript/javascript code, interacting with waves blockchain. Package contains all global type definitions. #### Example using mocha test runner ```typescript import '@waves/js-test-env';
Import package and write typescript/javascript code, interacting with waves blockchain. Package contains all global type definitions.
import '@waves/js-test-env';
env.API_BASE = "http://localhost:6869/";
env.CHAIN_ID = "R";
env.SEED = "waves private node seed with waves tokens";
describe('My first test suite', () => {
const wvs = 10 ** 8;
before(async function () {
this.timeout(0);
await setupAccounts({foo: 0.001 * wvs, bar: 0.001 * wvs});
});
it('Assertions', async function () {
const ttx = transfer({amount: 100000000000000, recipient: address()}, accounts.foo)
expect(ttx.proofs.length).to.equal(1)
await expect(broadcast(ttx)).rejectedWith()
})
// And define tests inside suites
// As you can see, we can use async functions to write async tests. sync functions have default timeout = 20s
it('Aks balance and height', async function () {
// You can set timeout. If you set it to zero, test won't finish untill function resolves
this.timeout(0);
// You can ask balance or currentHeigh
const b = await balance();
const h = await currentHeight();
// Console methods avalilable in test. Everything will be printed in repl
console.log(b, h)
})
it('Assertions', async function () {
const ttx = transfer({amount: 100000000000000, recipient: address()}, accounts.foo)
// Synchronous assertion
expect(ttx.proofs.length).to.equal(1)
// Async assertion. Expect broadcast to fail
await expect(broadcast(ttx)).rejectedWith()
})
})
Keep in mind that by default, if not passed, chainId
, seed
and nodeUrl
are taken from your test env configuration file (or Web IDE settings)
FAQs
Import package and write typescript/javascript code, interacting with waves blockchain. Package contains all global type definitions. #### Example using mocha test runner ```typescript import '@waves/js-test-env';
The npm package @waves/js-test-env receives a total of 0 weekly downloads. As such, @waves/js-test-env popularity was classified as not popular.
We found that @waves/js-test-env demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 15 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.