{"id":15939635,"url":"https://github.com/simone-sanfratello/tollo","last_synced_at":"2026-04-19T10:32:17.041Z","repository":{"id":57377812,"uuid":"114216793","full_name":"simone-sanfratello/tollo","owner":"simone-sanfratello","description":"javascript testing library AAA schema","archived":false,"fork":false,"pushed_at":"2018-08-02T10:23:29.000Z","size":72,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-17T14:47:17.750Z","etag":null,"topics":["bdd","engine","javascript","nodejs","tdd","test","testing","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simone-sanfratello.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-14T07:24:52.000Z","updated_at":"2020-07-23T06:06:32.000Z","dependencies_parsed_at":"2022-09-19T02:51:23.472Z","dependency_job_id":null,"html_url":"https://github.com/simone-sanfratello/tollo","commit_stats":null,"previous_names":["braceslab/tollo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/simone-sanfratello/tollo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simone-sanfratello%2Ftollo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simone-sanfratello%2Ftollo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simone-sanfratello%2Ftollo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simone-sanfratello%2Ftollo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simone-sanfratello","download_url":"https://codeload.github.com/simone-sanfratello/tollo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simone-sanfratello%2Ftollo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32004035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bdd","engine","javascript","nodejs","tdd","test","testing","unit-testing"],"created_at":"2024-10-07T06:20:27.083Z","updated_at":"2026-04-19T10:32:16.989Z","avatar_url":"https://github.com/simone-sanfratello.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tollo\n\n[![NPM Version](http://img.shields.io/npm/v/tollo.svg?style=flat)](https://www.npmjs.org/package/tollo)\n[![NPM Downloads](https://img.shields.io/npm/dm/tollo.svg?style=flat)](https://www.npmjs.org/package/tollo)\n[![JS Standard Style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)\n\njavascript testing library AAA schema\n\n# This project is under development\n\n## Purpose\n\nWrite declarative, massive, maintenable unit test  \n\n## Install\n\n````bash\n$ npm i tollo --save\n$ npm i tap -g\n````\n\n``tollo`` use ``tap`` as test engine\n\n### Quick start\n\nsee [example/basic.js](./example/basic.js)\n\n````js\nconst tollo = require('tollo')\n\n// sync pure function\nfunction sum (a, b) {\n  return a + b\n}\n\ntollo.add({\n  'function sum': {\n    describe: 'sum two numbers and get result',\n    mode: tollo.mode.SYNC,\n\n    act: sum,\n\n    cases: [\n      {\n        describe: 'basic case',\n        input: [1, 2],\n        output: 3\n      },\n      {\n        input: [1, 5],\n        output: 6\n      }\n    ]\n  }\n})\n\n// sync mutation function\nfunction pop (array) {\n  array.pop()\n}\n\ntollo.add({\n  'function pop': {\n    describe: 'pop the last element of the given array',\n    mode: tollo.mode.SYNC,\n\n    act: pop,\n    assert: tollo.assert.mutation,\n\n    cases: [\n      {\n        input: [[1, 2]],\n        output: [1]\n      },\n      {\n        input: [[1, 2, 3]],\n        output: [1, 2]\n      },\n      // fail\n      {\n        input: [[4, 5, 6]],\n        output: [4]\n      }      \n    ]\n  }\n})\n\n// async - Promise\nconst fs = require('fs-extra')\nconst tools = require('a-toolbox')\n\ntollo.add({\n  'fs.chmod': {\n    mode: tollo.mode.PROMISE,\n\n    arrange: async (input, sandbox) =\u003e {\n      await tools.fs.unlink('/tmp/chmod', true)\n      await tools.fs.touch('/tmp/chmod', 0o666)\n    },\n    act: fs.chmod,\n\n    cases: [\n      {\n        input: ['/tmp/chmod', 0o444]\n      },\n      {\n        input: ['/var/path/none', 0o444],\n        throw: new Error('ENOENT')\n      }\n    ]\n  }\n})\n\ntollo.run()\n````\n\nthen run by ``tap``\n\n````bash\ntap example/basic.js\n````\n\n![output](./doc/img/basic-output.png)\n\n## Documentation\n\nSee [documentation](./doc/README.md) for further informations.\n\n## TODO\n\n- [ ] documentation doc/README.md\n- [ ] unit test\n- [ ] PROMISE mode (doc, example, test)\n- [ ] CALLBACK mode (engine, doc, example, test)\n- [ ] HTTP mode (engine review, doc, example, test)\n- [ ] use other testing engine (``jest``, ``mocha``, ``istanbul``, ``jasmine`` ...)\n- [ ] browser version (with HTTP!)\n\n---\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2017-2018, [braces lab](https://braceslab.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimone-sanfratello%2Ftollo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimone-sanfratello%2Ftollo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimone-sanfratello%2Ftollo/lists"}