{"name":"@putout/plugin-tape","version":"20.3.1","keywords":["putout","putout-plugin","plugin"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-tape@20.3.1","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-tape#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"12bd8fc442f35e6d7b4af6fd2190139b7267eb87","tarball":"http://registry-npm.ywwl.com/@putout/plugin-tape/download/@putout/plugin-tape-20.3.1.tgz","fileCount":36,"integrity":"sha512-szBfTo7zdO5JwgcHvP927T4QhvrKxzfADHm5HW59nj4Z5SK+Yox1sVz0hdp0vWHToruhHQwG+13FocQSmlZAZA==","signatures":[{"sig":"MEYCIQDgyJCANk70RV7jQDkbf5wNPWPJRLmfOt4/o2y6U5WlpAIhAJvX9yjUSI7bKGPgdP42sHe1vSQQjE4iYrU4vXNonQOG","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46808,"size":10540,"noattachment":false,"key":"/@putout/plugin-tape/-/@putout/plugin-tape-20.3.1.tgz"},"main":"lib/index.js","type":"module","engines":{"node":">=22"},"gitHead":"b15bcf4dc6328bf93ed94b239cab16dc15504c4a","release":false,"scripts":{"lint":"madrun lint","test":"madrun test","report":"madrun report","coverage":"madrun coverage","fix:lint":"madrun fix:lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","watch:test":"madrun watch:test"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"changelog":false,"repository":{"url":"git+https://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"11.4.2","description":"🐊Putout plugin helps with tests","directories":{},"_nodeVersion":"25.6.1","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","eslint":"^10.0.0","madrun":"^12.0.0","montag":"^1.2.1","nodemon":"^3.0.1","@putout/test":"^15.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-putout":"^30.0.0","@putout/plugin-putout":"*"},"peerDependencies":{"putout":">=41"},"_npmOperationalInternal":{"tmp":"tmp/plugin-tape_20.3.1_1770825441152_0.4016892582987803","host":"s3://npm-registry-packages-npm-production"},"readme":"# @putout/plugin-tape [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-tape.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-tape \"npm\"\n\n> Tape-inspired TAP-compatible simplest high speed test runner with superpowers.\n>\n> (c) 📼[**Supertape**](https://github.com/coderaiser/supertape)\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin helps to apply best parctises for tests written with 📼[**Supertape**](https://github.com/coderaiser/supertape).\n\n## Install\n\n```\nnpm i @putout/plugin-tape -D\n```\n\n## Rules\n\n- ✅ [add-args](#add-args);\n- ✅ [add-t-end](#add-t-end);\n- ✅ [apply-assertions-order](#apply-assertions-order);\n- ✅ [apply-destructuring](#apply-destructuring);\n- ✅ [apply-stringify](#apply-stringify);\n- ✅ [apply-stub](#apply-stub);\n- ✅ [apply-with-name](#apply-with-name);\n- ✅ [convert-called-with-args](#convert-called-with-args);\n- ✅ [convert-called-with-no-args-to-called-with](#convert-called-with-no-args-to-called-with);\n- ✅ [convert-called-with-to-called-with-no-args](#convert-called-with-to-called-with-no-args);\n- ✅ [convert-deep-equal-to-equal](#convert-deep-equal-to-equal);\n- ✅ [convert-does-not-throw-to-try-catch](#convert-does-not-throw-to-try-catch);\n- ✅ [convert-emitter-to-promise](#convert-emitter-to-promise);\n- ✅ [convert-equal-length-to-match-string](#convert-equal-length-to-match-string);\n- ✅ [convert-equal-to-called-once](#convert-equal-to-called-once);\n- ✅ [convert-equal-to-deep-equal](#convert-equal-to-deep-equal);\n- ✅ [convert-equal-to-not-ok](#convert-equal-to-not-ok);\n- ✅ [convert-equal-to-ok](#convert-equal-to-ok);\n- ✅ [convert-equals-to-equal](#convert-equals-to-equal);\n- ✅ [convert-match-regexp-to-string](#convert-match-regexp-to-string);\n- ✅ [convert-ok-to-called-with](#convert-ok-to-called-with);\n- ✅ [convert-ok-to-match](#convert-ok-to-match);\n- ✅ [convert-tape-to-supertape](#convert-tape-to-supertape);\n- ✅ [convert-throws-to-try-catch](#convert-throws-to-try-catch);\n- ✅ [declare](#declare);\n- ✅ [extract-args-from-called-with](#extract-args-from-called-with);\n- ✅ [extract-result-from-assertion](#extract-result-from-assertion);\n- ✅ [jest](#jest);\n- ✅ [remove-default-messages](#remove-default-messages);\n- ✅ [remove-only](#remove-only);\n- ✅ [remove-skip](#remove-skip);\n- ✅ [remove-t-from-async](#remove-t-from-async);\n- ✅ [remove-useless-not-called-args](#remove-useless-not-called-args);\n- ✅ [remove-useless-t-end](#remove-useless-t-end);\n- ✅ [remove-useless-undefined](#remove-useless-undefined);\n- ✅ [switch-expected-with-result](#switch-expected-with-result);\n- ✅ [sync-with-name](#sync-with-name);\n\n## Config\n\n```json\n{\n    \"rules\": {\n        \"tape/add-args\": \"on\",\n        \"tape/add-t-end\": \"on\",\n        \"tape/apply-assertions-order\": \"on\",\n        \"tape/apply-destructuring\": \"on\",\n        \"tape/apply-stringify\": \"on\",\n        \"tape/apply-stub\": \"on\",\n        \n        \"tape/apply-with-name\": \"on\",\n        \n        \"tape/convert-called-with-args\": \"on\",\n        \n        \"tape/convert-called-with-no-args-to-called-with\": \"on\",\n        \"tape/convert-called-with-to-called-with-no-args\": \"on\",\n        \n        \"tape/convert-deep-equal-to-equal\": \"on\",\n        \"tape/convert-does-not-throw-to-try-catch\": \"on\",\n        \n        \"tape/convert-emitter-to-promise\": \"on\",\n        \"tape/convert-equal-length-to-match-string\": \"on\",\n        \"tape/convert-equal-to-called-once\": \"on\",\n        \"tape/convert-equal-to-deep-equal\": \"on\",\n        \"tape/convert-equals-to-equal\": \"on\",\n        \n        \"tape/convert-match-regexp-to-string\": \"on\",\n        \"tape/convert-ok-to-called-with\": \"on\",\n        \"tape/convert-ok-to-match\": \"on\",\n        \n        \"tape/convert-ok-to-pass\": \"on\",\n        \"tape/convert-tape-to-supertape\": \"on\",\n        \"tape/convert-throws-to-try-catch\": \"on\",\n        \n        \"tape/declare\": \"on\",\n        \"tape/extract-args-from-called-with\": \"on\",\n        \n        \"tape/extract-result-from-assertion\": \"on\",\n        \"tape/jest\": \"on\",\n        \n        \"tape/remove-default-messages\": \"on\",\n        \n        \"tape/remove-only\": [\"on\", {\n            \"allowed\": [\"test\"]\n        }],\n        \"tape/remove-skip\": [\"on\", {\n            \"allowed\": [\"test\"]\n        }],\n        \"tape/remove-t-from-async\": \"on\",\n        \"tape/remove-useless-not-called-args\": \"on\",\n        \"tape/remove-useless-t-end\": \"on\",\n        \n        \"tape/remove-useless-undefined\": \"on\",\n        \"tape/switch-expected-with-result\": \"on\",\n        \"tape/sync-with-name\": \"on\"\n    }\n}\n```\n\n## add-args\n\n### ❌ Example of incorrect code\n\n```js\ntest('xxx', () => {\n    t.end();\n});\n\ntest('hello: world', async () => {\n    const result = await get();\n    \n    deepEqual(result, []);\n});\n```\n\n### ✅ Example of correct code\n\n```js\ntest('xxx', (t) => {\n    t.end();\n});\n\ntest('hello: world', async ({deepEqual}) => {\n    const result = await get();\n    \n    deepEqual(result, []);\n});\n```\n\n## add-t-end\n\n### ❌ Example of incorrect code\n\n```js\ntest('xxx', () => {});\n```\n\n### ✅ Example of correct code\n\n```js\ntest('xxx', (t) => {\n    t.end();\n});\n```\n\n## apply-assertions-order\n\nCheck out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/0c0adae586448bd0921129275fb08891/c2f031920a3f1eb119c71b5ac3ba3c27ce1710ea).\n\n### ❌ Example of incorrect code\n\n```js\nt.equal(result, expected);\ncleanup();\nt.end();\n```\n\n### ✅ Example of correct code\n\n```js\ncleanup();\n\nt.equal(result, expected);\nt.end();\n```\n\n## apply-destructuring\n\nCheck out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/adf238850271c0a4ad917e71bab8757c/4ff416c3d9f3de0930339c7a4929eb4b62461d1a).\n\n### ❌ Example of incorrect code\n\n```js\nconst test = require('supertape');\n```\n\n### ✅ Example of correct code\n\n```js\nconst {test} = require('supertape');\n```\n\n## apply-stringify\n\nCheckout in 🐊[**Putout Editor**](https://putout.vercel.app/#/gist/6791411046ac930e7d53a8954ec1ac90/e3735554f156221a8f2661a447a9b4f7db8994e9)\n\n### ❌ Example of incorrect code\n\n```js\nconst read = stub().returns('{\"checkCoverage\": true}');\n```\n\n### ✅ Example of correct code\n\n```js\nconst read = stub().returns(stringify({\n    checkCoverage: true,\n}));\n```\n\n## apply-stub\n\nApply [stub](https://github.com/cloudcmd/stub) functions created. Look how it works in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/d098a8c8d03a072a7f3981e3cfb1d7af/f1542bfa39513ac625b2a9cd9243cc06dee286c0).\n\n### ❌ Example of incorrect code\n\n```js\nconst a = async () => true;\nconst b = async () => {};\nconst c = async () => throwError('hello');\n\nconst d = async () => {\n    throw Error('hello');\n};\n```\n\n### ✅ Example of correct code\n\n```js\nconst a = stub().resolves(true);\nconst b = stub().resolves();\nconst c = stub().rejects(Error('hello'));\nconst d = stub().rejects(Error('hello'));\n```\n\n## apply-with-name\n\n### ❌ Example of incorrect code\n\n```js\ntest('should call init before show', (t) => {\n    const init = stub();\n    const show = stub();\n    \n    t.calledInOrder([init, show]);\n    t.end();\n});\n```\n\n### ✅ Example of correct code\n\n```js\ntest('should call init before show', (t) => {\n    const init = stub().withName('init');\n    const show = stub().withName('show');\n    \n    t.calledInOrder([init, show]);\n    t.end();\n});\n```\n\n## convert-called-with-args\n\n### ❌ Example of incorrect code\n\n```js\nconst test = require('supertape');\nconst {stub} = test;\n\ntest('some message', (t) => {\n    const fn = stub();\n    fn();\n    \n    t.calledWith(fn, 'hello');\n    t.end();\n});\n```\n\n### ✅ Example of correct code\n\n```js\nconst test = require('supertape');\nconst {stub} = test;\n\ntest('some message', (t) => {\n    const fn = stub();\n    fn();\n    \n    t.calledWith(fn, ['hello']);\n    t.end();\n});\n```\n\n## convert-called-with-no-args-to-called-with\n\n### ❌ Example of incorrect code\n\n```js\nconst test = require('supertape');\nconst {stub} = test;\n\ntest('some message', (t) => {\n    const fn = stub();\n    fn();\n    \n    t.calledWithNoArgs(fn, [1, 2]);\n    t.end();\n});\n```\n\n### ✅ Example of correct code\n\n```js\nconst test = require('supertape');\nconst {stub} = test;\n\ntest('some message', (t) => {\n    const fn = stub();\n    fn();\n    \n    t.calledWith(fn, [1, 2]);\n    t.end();\n});\n```\n\n## convert-called-with-to-called-with-no-args\n\n### ❌ Example of incorrect code\n\n```js\nconst test = require('supertape');\nconst {stub} = test;\n\ntest('some message', (t) => {\n    const fn = stub();\n    fn();\n    \n    t.calledWith(fn);\n    t.end();\n});\n```\n\n### ✅ Example of correct code\n\n```js\nconst test = require('supertape');\nconst {stub} = test;\n\ntest('some message', (t) => {\n    const fn = stub();\n    fn();\n    \n    t.calledWithNoArgs(fn);\n    t.end();\n});\n```\n\n## convert-deep-equal-to-equal\n\nUse [`equal`](https://github.com/coderaiser/supertape#tequalactual-expected-msg) when comparing with primitives, [`deepEqual`](https://github.com/coderaiser/supertape#tdeepequalactual-expected-msg) for [`Objects`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) and [`Arrays`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array);\n\n### ❌ Example of incorrect code\n\n```js\nconst test = require('supertape');\nconst {stub} = test;\n\ntest('some message', (t) => {\n    t.deepEqual(x, 5);\n    t.end();\n});\n```\n\n### ✅ Example of correct code\n\n```js\nconst test = require('supertape');\nconst {stub} = test;\n\ntest('some message', (t) => {\n    t.equal(x, 5);\n    t.end();\n});\n```\n\n## convert-does-not-throw-to-try-catch\n\n### ❌ Example of incorrect code\n\n```js\nconst test = require('supertape');\n\ntest('some message', (t) => {\n    t.doesNotThrow(copymitter, 'should throw when no args');\n    t.end();\n});\n```\n\n### ✅ Example of correct code\n\n```js\nconst test = require('supertape');\nconst {tryCatch} = require('try-catch');\n\ntest('some test', (t) => {\n    const [error] = tryCatch(copymitter);\n    \n    t.notOk(error, 'should not throw when no args');\n    t.end();\n});\n```\n\n## convert-emitter-to-promise\n\n### ❌ Example of incorrect code\n\n```js\ntest('copymitter', (t) => {\n    const cp = copymitter(from, to, ['1']);\n    \n    cp.on('end', (t) => {\n        t.end();\n    });\n});\n```\n\n### ✅ Example of correct code\n\n```js\nconst {once} = require('node:events');\n\ntest('copymitter', async (t) => {\n    const cp = copymitter(from, to, ['1']);\n    \n    await once(cp, 'end');\n    \n    t.end();\n});\n```\n\n## convert-equal-length-to-match-string\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/df8cdc1545ac527b79ecc9bbca98f0d5/167216bb0f2228f1d4214f2d55ef5acef2d96447).\n\n### ❌ Example of incorrect code\n\n```js\ntest('hello: world', (t) => {\n    const count = (written.match(/## my-rule/) || []).length;\n    \n    t.equal(count, 1);\n    t.end();\n});\n```\n\n### ✅ Example of correct code\n\n```js\ntest('hello: world', (t) => {\n    t.match(written, /## my-rule/);\n    t.end();\n});\n```\n\n## convert-equal-to-called-once\n\nNo need to use [`equal`](https://github.com/coderaiser/supertape#tequalactual-expected-msg), [`supertape`](https://github.com/coderaiser/supertape) supports [`calledOnce`](https://github.com/coderaiser/supertape/tree/master/packages/operator-stub#tcalledoncefn--message).\n\n### ❌ Example of incorrect code\n\n```js\nconst test = require('supertape');\nconst {stub} = test;\n\ntest('some message', (t) => {\n    const fn = stub();\n    fn();\n    \n    t.equal(fn.callCount, 1);\n    t.end();\n});\n```\n\n### ✅ Example of correct code\n\n```js\nconst test = require('supertape');\nconst {stub} = test;\n\ntest('some message', (t) => {\n    const fn = stub();\n    fn();\n    \n    t.calledOnce(fn);\n    t.end();\n});\n```\n\n## convert-equal-to-deep-equal\n\n### ❌ Example of incorrect code\n\n```js\nconst expected = {\n    hello: 'world',\n};\n\nt.equal(error, expected);\nt.end();\n```\n\n### ✅ Example of correct code\n\n```js\nconst expected = {\n    hello: 'world',\n};\n\nt.deepEqual(error, expected);\nt.end();\n```\n\n## convert-equal-to-not-ok\n\n### ❌ Example of incorrect code\n\n```js\nt.equal(error, null);\n```\n\n### ✅ Example of correct code\n\n```js\nt.notOk(error);\n```\n\n## convert-equal-to-ok\n\n### ❌ Example of incorrect code\n\n```js\nt.equal(result, true);\n```\n\n### ✅ Example of correct code\n\n```js\nt.ok(result);\n```\n\n## convert-equals-to-equal\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/9a428ce99c5ec8966363a7a6da5bbba8/7441cbf7c8429b265259e7d67125fa138d7db19b).\n\n### ❌ Example of incorrect code\n\n```js\nt.equals(e.message, 'token should be a string!', 'should throw');\n```\n\n### ✅ Example of correct code\n\n```js\nt.equal(e.message, 'token should be a string!', 'should throw');\n```\n\n## convert-match-regexp-to-string\n\n### ❌ Example of incorrect code\n\n```js\nt.match(result, RegExp('hello'));\n```\n\n### ✅ Example of correct code\n\n```js\nt.match(result, 'hello');\n```\n\n## convert-ok-to-called-with\n\n### ❌ Example of incorrect code\n\n```js\nt.ok(set.calledWith(1, 2));\n```\n\n### ✅ Example of correct code\n\n```js\nt.calledWith(set, [1, 2]);\n```\n\n## convert-ok-to-match\n\n### ❌ Example of incorrect code\n\n```js\nt.ok(result.includes('hello'));\n```\n\n### ✅ Example of correct code\n\n```js\nt.match(result, /hello/);\n```\n\n## convert-tape-to-supertape\n\n### ❌ Example of incorrect code\n\n```js\nconst test = require('tape');\n```\n\n### ✅ Example of correct code\n\n```js\nconst test = require('supertape');\n```\n\n## convert-throws-to-try-catch\n\n### ❌ Example of incorrect code\n\n```js\nconst test = require('supertape');\n\ntest('some message', (t) => {\n    t.throws(copymitter, /from should be a string!/, 'should throw when no args');\n    t.end();\n});\n```\n\n### ✅ Example of correct code\n\n```js\nconst {tryCatch} = require('try-catch');\nconst test = require('supertape');\n\ntest('some message', (t) => {\n    const [error] = tryCatch(copymitter);\n    \n    t.equal(error.message, 'from should be a string!');\n    t.end();\n});\n```\n\n## declare\n\n### ❌ Example of incorrect code\n\n```js\ntest('xxx', (t) => {\n    const a = stub();\n    t.end();\n});\n```\n\n### ✅ Example of correct code\n\n```js\nimport {test, stub} from 'supertape';\n\ntest('xxx', (t) => {\n    const a = stub();\n    t.end();\n});\n```\n\n## extract-args-from-called-with\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/1a4b8e28b15ada7c7ad17e544ae03e2a/c6ca31508b8d4f2572d6a0c65dfbfe28c53016b1).\n\n### ❌ Example of incorrect code\n\n```js\ntest('abc: def', (t) => {\n    t.calledWith(executeFn, [\n        ['tape', 'test.js'], {\n            exit,\n        },\n    ]);\n});\n```\n\n### ✅ Example of correct code\n\n```js\ntest('abc: def', (t) => {\n    const args = [\n        ['tape', 'test.js'], {\n            exit,\n        },\n    ];\n    \n    t.calledWith(executeFn, args);\n});\n```\n\n## extract-result-from-assertion\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/264bc87f56eae9aa2b2884ff64fe7a06/94836a115a072a18fd717d5454792c1895ab0476).\n\n### ❌ Example of incorrect code\n\n```js\nt.notOk(screen.getByRole('button').disabled);\n\nt.deepEqual(readState({\n    getItem,\n}), {\n    a: 1,\n});\n```\n\n### ✅ Example of correct code\n\n```js\nconst {disabled} = screen.getByRole('button');\nt.notOk(disabled);\n\nconst result = readState({\n    getItem,\n});\n\nconst expected = {\n    a: 1,\n};\n\nt.deepEqual(result, expected);\n```\n\n## jest\n\n🐊**Putout** gives ability to switch easily from [**Jest**](https://github.com/coderaiser/putout/blob/master/packages/plugin-jest/README.md#putoutplugin-jest-) to 📼**Supertape**. Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/e610ded68d5808c2dbc09a1f84be8a96/c8f515668b5bdf16b58ef85c3ca13d93682f3ccb).\n\n### ❌ Example of incorrect code\n\n```js\nit('should equal', () => {\n    expect(a).toEqual(b);\n});\n```\n\n### ✅ Example of correct code\n\n```js\nimport {test} from 'supertape';\n\ntest('should equal', () => {\n    t.equal(a, b);\n    t.end();\n});\n```\n\n## remove-default-messages\n\n📼**Supertape** will put this information for you, and it is always the same.\nNo need to repeat the same information twice on one line, better to avoid it.\n\n### ❌ Example of incorrect code\n\n```js\nt.equal(result, expected, 'should equal');\n```\n\n### ✅ Example of correct code\n\n```js\nt.equal(result, expected);\n```\n\n## remove-only\n\n### ❌ Example of incorrect code\n\n```js\ntest.only('some test', (t) => {\n    t.end();\n});\n\ntestDeclareBeforeReference.only('some test', (t) => {\n    t.end();\n});\n```\n\n### ✅ Example of correct code\n\n```js\ntest('some test', (t) => {\n    t.end();\n});\n\ntestDeclareBeforeReference('some test', (t) => {\n    t.end();\n});\n```\n\n## remove-skip\n\n### ❌ Example of incorrect code\n\n```js\ntest.skip('some test', (t) => {\n    t.end();\n});\n```\n\n### ✅ Example of correct code\n\n```js\ntest('some test', (t) => {\n    t.end();\n});\n```\n\n## remove-t-from-async\n\n### ❌ Example of incorrect code\n\n```js\ntest('sqlite: all returns empty array', async (t) => {\n    const db = await createDb();\n    await db.exec('CREATE TABLE t (id INTEGER PRIMARY KEY, x TEXT)');\n    const rows = await db.all('SELECT x FROM t WHERE x = :x', {\n        x: 'missing',\n    });\n    \n    await t.dbAll(rows, []);\n    \n    t.end();\n});\n```\n\n### ✅ Example of correct code\n\n```js\ntest('sqlite: all returns empty array', async ({dbAll}) => {\n    const db = await createDb();\n    await db.exec('CREATE TABLE t (id INTEGER PRIMARY KEY, x TEXT)');\n    const rows = await db.all('SELECT x FROM t WHERE x = :x', {\n        x: 'missing',\n    });\n    \n    await dbAll(rows, []);\n});\n```\n\n## remove-useless-not-called-args\n\n### ❌ Example of incorrect code\n\n```js\nt.notCalled(fn, []);\n```\n\n### ✅ Example of correct code\n\n```js\nt.notCalled(fn);\n```\n\n## remove-useless-t-end\n\n### ❌ Example of incorrect code\n\n```js\ntest('test: remove me', () => {\n    t.end();\n    t.end();\n});\n```\n\n### ✅ Example of correct code\n\n```js\ntest('test: remove me', () => {\n    t.end();\n});\n```\n\n## remove-useless-undefined\n\n### ❌ Example of incorrect code\n\n```js\nstub().returns(undefined);\nstub().resolves(undefined);\n```\n\n### ✅ Example of correct code\n\n```js\nstub();\nstub().resolves();\n```\n\n## switch-expected-with-result\n\n📼**Supertape** uses more natural way of\ncomparing: first you pass `result` and then `expected`.\n\nIt gives you ability to use value instead of `expected` and\nunderstand code faster: no need to search for a second argument.\nWhile `result` is always a variable, so it most likely much shorter.\n\n### ❌ Example of incorrect code\n\n```js\ntest('plugin-apply-destructuring: transform: array: destructuring', (t) => {\n    t.equal(expected, result);\n    t.end();\n});\n```\n\n### ✅ Example of correct code\n\n```js\ntest('plugin-apply-destructuring: transform: array: destructuring', (t) => {\n    t.equal(result, expected);\n    t.end();\n});\n```\n\n## sync-with-name\n\n### ❌ Example of incorrect code\n\n```js\ntest('should call init before show', (t) => {\n    const init = stub().withName('show');\n    const show = stub().withName('show');\n    \n    t.calledInOrder([init, show]);\n    t.end();\n});\n```\n\n### ✅ Example of correct code\n\n```js\ntest('should call init before show', (t) => {\n    const init = stub().withName('init');\n    const show = stub().withName('show');\n    \n    t.calledInOrder([init, show]);\n    t.end();\n});\n```\n\n## convert-ok-to-pass\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/33a05ac444d013db10fc5a1986b6ac49/f1bc8eda628a5ce5dc6ad5ee20e796b727e40083).\n\n### ❌ Example of incorrect code\n\n```js\nt.ok(true);\n```\n\n### ✅ Example of correct code\n\n```js\nt.pass();\n```\n\n## License\n\nMIT\n","publish_time":1770825441283,"_cnpm_publish_time":1770825441283,"dist-tags":{"latest":"21.20.0"}}