{"id":15794201,"url":"https://github.com/paulvollmer/testtable.js","last_synced_at":"2025-07-21T03:04:15.074Z","repository":{"id":57135469,"uuid":"133500823","full_name":"paulvollmer/testtable.js","owner":"paulvollmer","description":"utility to write data driven tests","archived":false,"fork":false,"pushed_at":"2019-06-01T09:55:20.000Z","size":105,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-04T20:06:32.786Z","etag":null,"topics":["testing"],"latest_commit_sha":null,"homepage":"https://paulvollmer.net/testtable.js","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paulvollmer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-15T10:36:37.000Z","updated_at":"2019-05-29T23:49:09.000Z","dependencies_parsed_at":"2022-09-02T19:01:01.939Z","dependency_job_id":null,"html_url":"https://github.com/paulvollmer/testtable.js","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/paulvollmer/testtable.js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulvollmer%2Ftesttable.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulvollmer%2Ftesttable.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulvollmer%2Ftesttable.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulvollmer%2Ftesttable.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulvollmer","download_url":"https://codeload.github.com/paulvollmer/testtable.js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulvollmer%2Ftesttable.js/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264716693,"owners_count":23653514,"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":["testing"],"created_at":"2024-10-04T23:40:41.564Z","updated_at":"2025-07-21T03:04:15.038Z","avatar_url":"https://github.com/paulvollmer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# testtable.js\nModule to write data driven tests.\n\n\n## Installation\n\n```\nnpm install --save-dev @paulvollmer/testtable\n```\n\nor if you prefer yarn, run\n\n```\nyarn add --dev @paulvollmer/testtable\n```\n\n\n## Usage\n\n```js\nconst TestTable = require('testtable');\n\ndescribe('Sample test', () =\u003e {\n\n  // create an array with input and expected data\n  const testData = [\n    { input: 'hello foo', expected: 'hello world', skip: true },\n    { input: 'hello bar', expected: 'hello world' },\n  ];\n\n  // run all tests defined at the testData array\n  new TestTable(testData).run((index, data) =\u003e {\n    test(`${index} should ...`, () =\u003e {\n      expect(index).toBe(1);\n      expect(data.input).toBe('hello bar');\n      expect(data.expected).toBe('hello world');\n    })\n  });\n\n});\n```\n\n## Test data\n\nSample test data object\n```\n{\n  input: 'hello foo',\n  expected: 'hello bar',\n  only: true\n}\n```\n\n#### input\nThe `input` property can be used to define the test data.\n\n#### expected\nThe `expected` property set the data used to write code to check if x expect to be equal to y\n\n#### only\nThe `only` property can be used to only run a specific item from the test data\n\n#### skip\nThe `skip` property can be used to skip the execution of a test item\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulvollmer%2Ftesttable.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulvollmer%2Ftesttable.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulvollmer%2Ftesttable.js/lists"}