{"id":13745626,"url":"https://github.com/perguth/flip-tape","last_synced_at":"2025-05-09T06:31:02.646Z","repository":{"id":57238455,"uuid":"76093392","full_name":"perguth/flip-tape","owner":"perguth","description":":microscope: Write eloquent tests: 'Tautology'.equals(true, true)","archived":true,"fork":false,"pushed_at":"2017-10-06T02:12:28.000Z","size":44,"stargazers_count":8,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-13T10:41:06.109Z","etag":null,"topics":["tape","testing"],"latest_commit_sha":null,"homepage":"","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/perguth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-10T05:46:56.000Z","updated_at":"2023-01-21T09:40:57.000Z","dependencies_parsed_at":"2022-08-26T15:11:46.434Z","dependency_job_id":null,"html_url":"https://github.com/perguth/flip-tape","commit_stats":null,"previous_names":["pguth/flip-tape"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perguth%2Fflip-tape","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perguth%2Fflip-tape/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perguth%2Fflip-tape/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perguth%2Fflip-tape/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perguth","download_url":"https://codeload.github.com/perguth/flip-tape/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224834876,"owners_count":17377791,"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":["tape","testing"],"created_at":"2024-08-03T06:00:31.262Z","updated_at":"2024-11-15T19:30:35.503Z","avatar_url":"https://github.com/perguth.png","language":"JavaScript","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# flip-tape\n\n\u003e  Write eloquent tests: `'Tautology'.equals(true, true)`\n\nMore specific: **`flip-tape`** adds `'Two is less than three'.ok(2 \u003c 3)` syntax to [tape](https://github.com/substack/tape) plus two further callback-executing methods. Original functionality is kept.\n\n![flipped tape machine](vendor/flipped-tape.png)\n\n```bash\nnpm install flip-tape\n```\n\n## Usage\n\n```js\nvar test = require('flip-tape')\n\ntest('Regular tape assertion group', t =\u003e {\n  t.plan(4)\n  t.ok(2 \u003c 3, 'Regular tape syntax works as expected.')\n\n  // This is new:\n  'Two is less than three'.ok(2 \u003c 3)\n  'Five equals five'.equals(5, 5)\n\n  'This string becomes a tape comment'.t(t =\u003e {\n    t.notOk(2 \u003e 3, 'And both syntax types...')\n    '... still work'.notOk(2 \u003e 3)\n  })\n})\n\n'You can also start a group of assertions this way...'.test(t =\u003e {\n  t.plan(1)\n  '... and everything works as expected!'.pass()\n})\n```\n\nAll of [tapes methods](https://github.com/substack/tape#methods) that print out `msg` to the command-line are usable with the flipped syntax.\n\n## API\n\n#### `var test = require('flip-tape')`\n\nAttaches all tape-methods that print out to the command-line plus the `.t()` and `.test()` methods to the String prototype.\n\n#### `'[message]'.test([opt], cb)`, `'[message]'.only([opt], cb)`\n\nCalls the respective `tape` method: [`.test`](https://github.com/substack/tape#ttestname-opts-cb) or [`.only`](https://github.com/substack/tape#testonlyname-cb).\n\n#### `'[message]'.t(cb)`\n\nA [tape comment](https://github.com/substack/tape#tcommentmessage) containing the `message` is added. Then `cb(t)` gets called with the [test object t](https://github.com/substack/tape#tplann).\n\n#### `'[message]'.tapeTestMethodName([actual, fn], [expected])`\n\nCalls the according [tape method](https://github.com/substack/tape#methods) relaying the message string and the optional parameters.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperguth%2Fflip-tape","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperguth%2Fflip-tape","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperguth%2Fflip-tape/lists"}