
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@waxio/waxunit
Advanced tools
This unit test framework allows quick and simple unit testing capabilities for samar contracts on the wax blockchain
$ npm install --save-dev @waxio/waxunit
See the API
In the first beforeAll
type function of your unit tests you must call setupTestChain
. Example:
// This is the entire API available to you
const {
setupTestChain,
randomWamAccount,
sleep,
eosjs,
createAccount,
setContract,
updateAuth,
linkauth,
getTableRows,
transfer,
TESTING_PUBLIC_KEY,
genericAction,
dedupeTapos,
} = require('@waxio/waxunit');
describe('my test suite', () => {
beforeAll(async () => {
await setupTestChain(); // Must be called first to setup the test chain
await createAccount('mycontract11');
await setContract(
'mycontract11',
'build/mycontract11.wasm',
'build/mycontract11.abi'
);
await updateAuth('mycontract11', `active`, `owner`, {
threshold: 1,
accounts: [
{
permission: {
actor: 'mycontract11',
permission: `eosio.code`,
},
weight: 1,
},
],
keys: [
{
key: TESTING_PUBLIC_KEY,
weight: 1,
},
],
waits: [],
});
await transfer(
'eosio',
'mycontract11',
'200.00000000 WAX',
`sending some test funds`
);
});
it('my test case', async () => {
const balances = await getTableRows(
'eosio.token',
`accounts`,
'mycontract11'
);
expect(balances.length).toEqual(1);
expect(balances[0].balance).toEqual('200.00000000 WAX');
});
});
FAQs
wax.io blockchain smart contract unit testing framework
We found that @waxio/waxunit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.