{"_id":"@acryl/js-test-env","_rev":"2-fa0b6c9d3fbb98a70a5b577c12bd649e","name":"@acryl/js-test-env","dist-tags":{"latest":"0.7.5"},"versions":{"0.7.4":{"name":"@acryl/js-test-env","version":"0.7.4","description":"Import package and write typescript/javascript code, interacting with acryl blockchain. Package contains all global type definitions. #### Example using mocha test runner ```typescript import '@acryl/js-test-env';","main":"index.js","types":"index.d.ts","scripts":{},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/acrylplatform/js-test-env.git"},"author":"","license":"ISC","bugs":{"url":"https://github.com/acrylplatform/js-test-env/issues"},"homepage":"https://github.com/acrylplatform/js-test-env#readme","dependencies":{"@acryl/ride-js":"^1.0.1","@acryl/acryl-transactions":"^3.16.7","chai":"^4.2.0","chai-as-promised":"^7.1.1","tslib":"^1.10.0"},"devDependencies":{"@types/chai":"^4.1.7","@types/chai-as-promised":"^7.1.0","@types/node":"^12.0.8","tslint":"^5.17.0","typedoc":"^0.15.0","typedoc-plugin-external-module-name":"^2.1.0","typescript":"^3.5.1"},"_id":"@acryl/js-test-env@0.7.4","_nodeVersion":"10.19.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-JdleOLWFOZDYm1385G0tGULF6ykcMheycJ1dAy/WylKbni+2uoPTM9qxwG66LoS3xa5bUfZHUnWIpon57K40Ow==","shasum":"16b5baf384711e65f5659c8d0857f20951adaa6c","tarball":"https://registry.npmjs.org/@acryl/js-test-env/-/js-test-env-0.7.4.tgz","fileCount":6,"unpackedSize":29069,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJecEdiCRA9TVsSAnZWagAAA70P/1y+JL9HY2sLIJLEM6tJ\nxrM5xDjQaGUaqLO5ruJG+wtd7BtyP7FEaQABcbqDPfBgE18gS+uEYGXoVOFL\n19rgpMCJJIGXEX1byELFbi0abLvIlKLYnGK62mQuX/bIR54CC/tcXAc/QoJ/\n+ztG/HNAI8ToJtSdRj+bj8T5ydKkmZSbgYJ2BNUI91OJ+Hw4QL8wqke6TH05\nP3Bl9BBQShqEOx4FYTOjpwnut5g4WkSAR/szBtZRaJw8mMk+9eEExKrWXdve\nnPzHwBG5JjcxW7A4FrU1ITeixb6Qejb1L6EwhkasJdx0xdhRt48fV0nm23cw\nsRExbb5LahzoUotL/O4eI/Eh3zAP5fo7y/6uoGCDkszm80bs9ZXUoWehgH37\nvC9PCG3mK7+8oCpwYmlwaF0W8THr/l2/L29nVCos+6+O5k3dIC/QPz8gg2OO\nZa+nwdQWSg2KIvndstERLnNwwetjm3vjuQeHcGDyjRVjY0aBUr+xb+EOVYJO\nNRZCyZci+DondKYFU3e/ddxspViFuq0FK4z3EkooOcftLT3QJeKS8M6I4YtK\nDcgcqvNu3zFJ4fMOPpVN76Xgx7PlJ//B8v5+wbtbvQlOxpAcSmf9e1T3bmCX\n6BOTy/MgHpUkDezTJxhHlxn63K3sizc4fkFcQKxLLY7yJiJLBG1g1noClM2O\nd98t\r\n=9PaE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGXNSD6aVWJpE5hXsa468C6mZiu8za2p550UOKfUPg9IAiAFhiw4yFIAdUbU4IMV1cr/9dV36a6KaL5BzhAvyjsarA=="}]},"maintainers":[{"name":"deadblackclover","email":"deadblackclover@protonmail.com"},{"name":"eaz","email":"eaz@acrylplatform.com"}],"_npmUser":{"name":"eaz","email":"eaz@acrylplatform.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/js-test-env_0.7.4_1584416609872_0.20815449814998432"},"_hasShrinkwrap":false},"0.7.5":{"name":"@acryl/js-test-env","version":"0.7.5","description":"Import package and write typescript/javascript code, interacting with acryl blockchain. Package contains all global type definitions. #### Example using mocha test runner ```typescript import '@acryl/js-test-env';","main":"index.js","types":"index.d.ts","scripts":{},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/acrylplatform/js-test-env.git"},"author":"","license":"ISC","bugs":{"url":"https://github.com/acrylplatform/js-test-env/issues"},"homepage":"https://github.com/acrylplatform/js-test-env#readme","dependencies":{"@acryl/ride-js":"^1.0.1","@acryl/acryl-transactions":"^3.16.8","chai":"^4.2.0","chai-as-promised":"^7.1.1","tslib":"^1.10.0"},"devDependencies":{"@types/chai":"^4.1.7","@types/chai-as-promised":"^7.1.0","@types/node":"^12.0.8","tslint":"^5.17.0","typedoc":"^0.15.0","typedoc-plugin-external-module-name":"^2.1.0","typescript":"^3.5.1"},"_id":"@acryl/js-test-env@0.7.5","_nodeVersion":"10.19.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-s65JGnPY5a3nIN1Ic01mycQBrBagInmAiunQZ1Ab2CP2YrwKc9sTUxW0kd1YNyBU9k5gHIYt12XZ2IRmbCD+lA==","shasum":"8aeb9dba2254b41a6f8c9b7a5b727373b7710b6b","tarball":"https://registry.npmjs.org/@acryl/js-test-env/-/js-test-env-0.7.5.tgz","fileCount":6,"unpackedSize":29069,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeisuYCRA9TVsSAnZWagAAIBUP/0zuEmT9u6sEExGymyu6\nW0HoNh9sKo13WGx+i4CozlYyJydqoXPt05eEpXJUfKOBDea9fbkGTRL1vRBf\nxOtbzwKnmMKfvfFkLQNcx+72PKH/d53z2u48QvNjcRUtXRZ9giPk0x08MK9s\nPVMSUYcENwkFsaAB3teD2kk1L5dCJffxKJYCeKfioFBFvT+u4V0GvZprRJvW\ntBHySvWZCrfygpa0fbYu0iXlikhJd0bfQlpZ4ZrmUzd8Nn4bBI/PJ0sQRPKn\n/9Warg8UJz9cUr3OU/A/Hg8HOd9Hk2TZt6YH1yRQ0H15YzvvHd3OuOWNFNAj\nsgIb9OvSrySVXRLnwGrSP9gW+lsQC5kks2sKbHyqBiN2zKRtrNP30NEAy676\nP355GA57vflZ/QcQwx9AZ++GjihK9SNp5NKPVaxHYJ+Gj06Gu9O2KN+McPv+\nHg03S/rC0toqmI+k50/P7hdvnDXu59A9MT/tSb2CRdhxal2NlSoVBe0HsRuT\n+cfQuXaY4gP6QxjuE7IL0EG/ejARYxlOQ9RYZk96WX/PfcDwUKCSeXVxaOoN\nA1V/BCavrDBqO5vye+04D1bCJiQUZZi1dXQfsyf2x/4TylmlcYZDSBnKSbeR\nA5Ybit5243Zig+N+trA4qlTnEyNhzr+2KvvxQ9lBviiJIe1LkHln+KQxfn7R\nRDl6\r\n=5iVf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+YS5q7y6n+NZhR4GJ+gMnIrv4fidorLgMceD9X7GfTAIhAMW0FVqcrlJlKDmMhM0m4KXRK+DGSHB/TWiZ+sL58oew"}]},"maintainers":[{"name":"deadblackclover","email":"deadblackclover@protonmail.com"},{"name":"eaz","email":"eaz@acrylplatform.com"}],"_npmUser":{"name":"eaz","email":"eaz@acrylplatform.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/js-test-env_0.7.5_1586154391985_0.6306078881140817"},"_hasShrinkwrap":false}},"time":{"created":"2020-03-17T03:43:29.659Z","0.7.4":"2020-03-17T03:43:30.114Z","modified":"2022-04-04T11:16:34.712Z","0.7.5":"2020-04-06T06:26:32.231Z"},"maintainers":[{"name":"deadblackclover","email":"deadblackclover@protonmail.com"},{"name":"eaz","email":"eaz@acrylplatform.com"}],"description":"Import package and write typescript/javascript code, interacting with acryl blockchain. Package contains all global type definitions. #### Example using mocha test runner ```typescript import '@acryl/js-test-env';","homepage":"https://github.com/acrylplatform/js-test-env#readme","repository":{"type":"git","url":"git+https://github.com/acrylplatform/js-test-env.git"},"bugs":{"url":"https://github.com/acrylplatform/js-test-env/issues"},"license":"ISC","readme":"# Testing environment form ACRYL blockchain\n### How to ?\n\nImport package and write typescript/javascript code, interacting with acryl blockchain. Package contains all global type definitions.\n#### Example using mocha test runner\n```typescript\nimport '@acryl/js-test-env';\n\nenv.API_BASE = \"http://localhost:6869/\";\nenv.CHAIN_ID = \"R\";\nenv.SEED = \"acryl private node seed with acryl tokens\";\n\ndescribe('My first test suite', () => {\n    const acr = 10 ** 8;\n    before(async function () {\n        this.timeout(0);\n        await setupAccounts({foo: 0.001 * acr, bar: 0.001 * acr});\n    });\n\n    it('Assertions', async function () {\n        const ttx = transfer({amount: 100000000000000, recipient: address()}, accounts.foo)\n        expect(ttx.proofs.length).to.equal(1)\n        await expect(broadcast(ttx)).rejectedWith()\n    })\n    // And define tests inside suites\n    // As you can see, we can use async functions to write async tests. sync functions have default timeout = 20s\n    it('Aks balance and height', async function () {\n        // You can set timeout. If you set it to zero, test won't finish untill function resolves\n        this.timeout(0);\n        // You can ask balance or currentHeigh\n        const b = await balance();\n        const h = await currentHeight();\n        // Console methods avalilable in test. Everything will be printed in repl\n        console.log(b, h)\n    })\n\n    it('Assertions', async function () {\n        const ttx = transfer({amount: 100000000000000, recipient: address()}, accounts.foo)\n        // Synchronous assertion\n        expect(ttx.proofs.length).to.equal(1)\n        // Async assertion. Expect broadcast to fail\n        await expect(broadcast(ttx)).rejectedWith()\n    })\n})\n\n```\n\n### [Here](https://acrylplatform.github.io/js-test-env/globals.html) you can find list of all globally available functions for ride test environment and REPL \n\nKeep in mind that by default, if not passed, `chainId`, `seed` and `nodeUrl` are taken from your test env configuration file (or Web IDE settings) \n","readmeFilename":"README.md"}