{"id":24247373,"url":"https://github.com/codeworksfrance/toml-it","last_synced_at":"2026-04-17T08:03:41.083Z","repository":{"id":62946602,"uuid":"563357197","full_name":"CodeWorksFrance/toml-it","owner":"CodeWorksFrance","description":"A stupid TOML integration tests typescript library","archived":false,"fork":false,"pushed_at":"2022-11-14T10:51:15.000Z","size":190,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-04T16:16:48.777Z","etag":null,"topics":["codeworks","integration-testing","javascript","jest","toml","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/CodeWorksFrance.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":"2022-11-08T12:55:54.000Z","updated_at":"2022-11-14T11:00:14.000Z","dependencies_parsed_at":"2023-01-21T15:40:49.271Z","dependency_job_id":null,"html_url":"https://github.com/CodeWorksFrance/toml-it","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeWorksFrance%2Ftoml-it","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeWorksFrance%2Ftoml-it/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeWorksFrance%2Ftoml-it/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeWorksFrance%2Ftoml-it/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeWorksFrance","download_url":"https://codeload.github.com/CodeWorksFrance/toml-it/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241877486,"owners_count":20035417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["codeworks","integration-testing","javascript","jest","toml","typescript"],"created_at":"2025-01-14T23:46:02.872Z","updated_at":"2026-04-17T08:03:41.029Z","avatar_url":"https://github.com/CodeWorksFrance.png","language":"TypeScript","readme":"# toml-it\n\n[![npm package](https://img.shields.io/github/package-json/v/CodeWorksFrance/toml-it)](https://www.npmjs.com/package/toml-it) [![Node.js CI](https://github.com/CodeWorksFrance/toml-it/actions/workflows/nodejs-ci.yml/badge.svg)](https://github.com/CodeWorksFrance/toml-it/actions/workflows/nodejs-ci.yml) \u0026nbsp; [![eslint](https://github.com/CodeWorksFrance/toml-it/actions/workflows/eslint.yml/badge.svg)](https://github.com/CodeWorksFrance/toml-it/actions/workflows/eslint.yml)\n\n`toml-it` it a simple integration tests runner. It tests the output of a `node` program.\n\n## How to install?\n\n```sh\nnpm i -D toml-it\n```\n\n## How to write a test?\n\nTests files must match the following pattern `**/*.spec.toml`.\nThe structure of a tests should be:\n\n``` toml\nstdout=\"\"\ndescription=\"\"\nargs=\"\"\n```\n\n## Run tests\n\nIf you are using `jest` as test runner, you can simply create a file `toml-it.spec.ts` and enter the following code:\n\n```ts\nimport { TestRunner } from \"toml-it\";\n\ndescribe('integration tests with toml', () =\u003e {\n  it('toml it', () =\u003e {\n    new TestRunner().run();\n  });\n});\n```\n\nThen add the following command in your `package.json`:\n\n```json\n\"scripts\": {\n    ...,\n    \"test:integration\": \"tsc; jest\",\n  },\n```\n\n## Example\n\nIf you want to test the following production code:\n\n```ts\nif (process.argv.length === 3) {\n  console.log(\"ok\");\n} else {\n  console.log(\"not ok\");\n}\n```\n\nYou now could write two files:\n\n### `notok.spec.toml`\n\n```toml\nstdout = \"not ok\"\nargs = \"argument_1 argument_2 argument_3\"\ndescription=\"Should display 'not ok'\"\n```\n\n### `ok.spec.toml`\n\n```toml\nstdout = \"ok\"\nargs = \"argument_1\"\ndescription=\"Should display 'ok'\"\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeworksfrance%2Ftoml-it","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeworksfrance%2Ftoml-it","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeworksfrance%2Ftoml-it/lists"}