{"_rev":"4-5d0ffbb944e0e10a54c8f5e977fd48af","time":{"created":"2026-03-31T02:32:30.981Z","modified":"2026-03-31T02:32:31.543Z","1.0.0":"2026-03-31T02:09:26.665Z","0.1.1":"2026-03-31T02:32:31.203Z"},"_id":"@anvoio/anvo-test","name":"@anvoio/anvo-test","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.1":{"name":"@anvoio/anvo-test","version":"0.1.1","description":"Anvo Network smart contract testing framework","main":"dist/index.js","license":"MIT","scripts":{"build":"tsc","prepare":"npm run build","prettier":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","lint":"tslint -p tsconfig.json","test":"jest "},"dependencies":{"eosjs":"^22.1.0","eosjs-account-name":"^2.2.1","node-fetch":"2","tslint":"^6.1.3"},"devDependencies":{"@types/jest":"^28.1.4","jest":"^28.1.1","prettier":"^2.7.1","ts-jest":"^28.0.4","ts-node":"^10.8.1","tslib":"^2.4.0","typescript":"^4.7.3"},"directories":{"doc":"docs","test":"test"},"repository":{"type":"git","url":"git+https://github.com/AnvoIO/anvo-test.git"},"keywords":["anvo","anvoio","testing","smart-contract"],"author":{"name":"Anvo Network"},"bugs":{"url":"https://github.com/AnvoIO/anvo-test/issues"},"homepage":"https://github.com/AnvoIO/anvo-test#readme","gitHead":"0b5d475542fba207555f6f767cedd9fbeda70abb","types":"./dist/index.d.ts","_id":"@anvoio/anvo-test@0.1.1","_nodeVersion":"20.20.1","_npmVersion":"11.12.1","dist":{"integrity":"sha512-vQ+2AY54QBVVXhLFBVhpJCihcNBVbmx8P4kvcheqJxzXT+na1KVJnAXAF4R3hV/xhEENpslRcz+HxYH8MpT5EQ==","shasum":"cb7876e490c48cbab68332591f545ade121abc7a","tarball":"https://registry.npmjs.org/@anvoio/anvo-test/-/anvo-test-0.1.1.tgz","fileCount":48,"unpackedSize":91391,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anvoio%2fanvo-test@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFmwKIDs56ScnP9kPlTKYLpFPRrIS4RJ76rC4nJmr0GfAiB2wZRvXKixmapo6g6UBo5WIu386Ed0c1tP8OaDl7nbqg=="}]},"_npmUser":{"name":"rwcii","email":"robert@anvo.io"},"maintainers":[{"name":"rwcii","email":"robert@anvo.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/anvo-test_0.1.1_1774924351039_0.11791844319064104"},"_hasShrinkwrap":false}},"maintainers":[{"name":"rwcii","email":"robert@anvo.io"}],"description":"Anvo Network smart contract testing framework","homepage":"https://github.com/AnvoIO/anvo-test#readme","keywords":["anvo","anvoio","testing","smart-contract"],"repository":{"type":"git","url":"git+https://github.com/AnvoIO/anvo-test.git"},"author":{"name":"Anvo Network"},"bugs":{"url":"https://github.com/AnvoIO/anvo-test/issues"},"license":"MIT","readme":"# Welcome to anvo-test\n\n[![npm](https://img.shields.io/npm/v/@anvoio/anvo-test)](https://www.npmjs.com/package/@anvoio/anvo-test)\n[![CI](https://github.com/AnvoIO/anvo-test/actions/workflows/ci.yml/badge.svg)](https://github.com/AnvoIO/anvo-test/actions/workflows/ci.yml)\n\nanvo-test is an open-source Javascript-based smart-contract testing framework for [Anvo Core](https://github.com/AnvoIO/core) blockchains.\n\nanvo-test gives you the ability to dockerize an Anvo Core node. This allows a developer to host it on any system that supports [Docker](https://docs.docker.com). Using anvo-test, developers can simplify testing of smart contracts and automate things like table seeding, account creation, and other initialisation tasks that are required before running complex test scenarios.\n\nThe framework supports multiple chain configurations — ANVO is the first chain configured, and additional chains that adopt Anvo Core can be added easily.\n\n#### Noteworthy Features\n\n- Ability to run tests in parallel\n- Supports ARM64 and AMD64 architectures (Ubuntu 24.04 LTS)\n- Ability to insert/modify/erase data for each table\n- Update the chain time to fast-forward the chain and allow testing future states\n- Multi-chain extensible architecture\n- Published to [npm](https://www.npmjs.com/package/@anvoio/anvo-test) and [GHCR](https://github.com/AnvoIO/anvo-test/pkgs/container/anvo-test)\n\n## Quick start\n\n### Installation\n\nRefer to [an example project](example)\n\n```bash\nnpm install --save-dev @anvoio/anvo-test\n```\n\n#### Jest\nInstall `jest`\n```\nnpm install --save-dev jest@^28.1.3\n```\nConfig `jest`: Create jest.config.js and add the following:\n\n```\nmodule.exports = {\n  // transform: { \"^.+\\\\.(ts|tsx)$\": \"ts-jest\" },\n  testEnvironment: \"node\",\n  testTimeout: 120 * 1e3,\n};\n```\n\n#### Docker\n\nTo install docker please refer [here](https://docs.docker.com/engine/install/)\n\n### Run\nUpdate test command in package.json\n\n```\n\"test\": \"jest\"\n```\n\nRun\n\n```\nnpm run test\n```\n\n### Usage\n```\nconst { Chain } = require(\"@anvoio/anvo-test\");\nconst { expectAction } = require(\"@anvoio/anvo-test\");\n```\n**Api** and **JsonRpc** from **eosjs** are available through the **[Chain](docs/api/chain.md)** class\n\n```javascript\n// Setup an ANVO test chain\nconst chain = await Chain.setupChain(\"ANVO\");\n\n// Run your tests...\n\n// Clean up\nawait chain.clear();\n```\n\n* [Using anvo-test to write contract tests](docs/tutorial/usage.md)\n\n## anvo-test API\n### Classes\n\n**Public**\n\n* [Account](docs/api/account.md)\n* [Chain](docs/api/chain.md)\n* [Contract](docs/api/contract.md)\n* [Table](docs/api/table.md)\n* [Time](docs/api/time.md)\n\n**Internal**\n\n* [Asset](docs/api/asset.md)\n* [Symbol](docs/api/symbol.md)\n* [System](docs/api/system.md)\n\n\n### Functions\n\n**Public**\n\n* [Assertion](docs/api/assertion.md)\n* [Wallet](docs/api/wallet.md)\n\n## Adding New Chain Configurations\n\nTo add support for a new chain:\n\n1. Create a deploy script: `docker/scripts/deploy_system_contract_{chain}.sh`\n2. Add contract artifacts: `docker/contracts/{chain}/`\n3. Register the chain in `src/chain.ts` (`validChainNames`, `getChainTokenDecimal`, `getSystemAccountPrefix`)\n\n## Licence\n\nThis code is provided as is, under [MIT Licence](LICENSE).\n\n## Attribution\n\nanvo-test is derived from [Qtest](https://github.com/GenerEOS/Qtest), originally created by [GenerEOS](https://genereos.io) with funding from the [EOS Network Foundation](https://eosnetwork.com/). See [NOTICE](NOTICE) for details.\n","readmeFilename":"README.md"}