{"id":13684413,"url":"https://github.com/macklinu/danger-plugin-no-test-shortcuts","last_synced_at":"2025-04-30T20:33:54.975Z","repository":{"id":57211399,"uuid":"90161788","full_name":"macklinu/danger-plugin-no-test-shortcuts","owner":"macklinu","description":"Danger plugin to prevent merging test shortcuts (.only and .skip)","archived":false,"fork":false,"pushed_at":"2018-10-04T08:20:06.000Z","size":1191,"stargazers_count":4,"open_issues_count":10,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T19:15:19.371Z","etag":null,"topics":["ci","danger","danger-plugin","nodejs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/danger-plugin-no-test-shortcuts","language":"TypeScript","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/macklinu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-03T15:02:21.000Z","updated_at":"2021-09-27T09:47:57.000Z","dependencies_parsed_at":"2022-08-30T14:30:12.502Z","dependency_job_id":null,"html_url":"https://github.com/macklinu/danger-plugin-no-test-shortcuts","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macklinu%2Fdanger-plugin-no-test-shortcuts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macklinu%2Fdanger-plugin-no-test-shortcuts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macklinu%2Fdanger-plugin-no-test-shortcuts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macklinu%2Fdanger-plugin-no-test-shortcuts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macklinu","download_url":"https://codeload.github.com/macklinu/danger-plugin-no-test-shortcuts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251777780,"owners_count":21642224,"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":["ci","danger","danger-plugin","nodejs"],"created_at":"2024-08-02T14:00:33.275Z","updated_at":"2025-04-30T20:33:54.369Z","avatar_url":"https://github.com/macklinu.png","language":"TypeScript","funding_links":[],"categories":["Plugins"],"sub_categories":["TypeScript (danger-js)"],"readme":"# danger-plugin-no-test-shortcuts\n\n[![Build Status](https://travis-ci.org/macklinu/danger-plugin-no-test-shortcuts.svg?branch=master)](https://travis-ci.org/macklinu/danger-plugin-no-test-shortcuts)\n[![npm version](https://badge.fury.io/js/danger-plugin-no-test-shortcuts.svg)](https://badge.fury.io/js/danger-plugin-no-test-shortcuts)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![Greenkeeper badge](https://badges.greenkeeper.io/macklinu/danger-plugin-no-test-shortcuts.svg)](https://greenkeeper.io/)\n\n\n[Danger](https://github.com/danger/danger-js) plugin to prevent merging test shortcuts (.only and .skip)\n\n## Usage\n\nImport and invoke the `noTestShortcuts()` function in your Dangerfile:\n\n```js\n// dangerfile.js\nimport noTestShortcuts from 'danger-plugin-no-test-shortcuts'\n\nnoTestShortcuts({\n  testFilePredicate: (filePath) =\u003e filePath.endsWith('.test.js'),\n})\n```\n\nBy default, Danger will fail the build if a new or modified test file contains `.only()` - this prevents merging changes that will prevent your entire test suite from running on each pull request.\n\nThis plugin takes an optional config object with a couple of options:\n\n```js\nnoTestShortcuts({\n  // A required predicate for determining where your test files live.\n  testFilePredicate: (filePath) =\u003e filePath.endsWith('.test.js'),\n\n  // Defines the behavior for handling skipped tests (e.g. test.skip()).\n  // Defaults to 'ignore'.\n  // Valid values: 'ignore', 'fail', 'warn'.\n  skippedTests: 'fail',\n\n  // Defines any (additional) patterns you want to test for\n  // Defaults to no extra patterns\n  // Here you can add patterns specific to how your test framework does skips/onlys\n  patterns: {\n    only: ['customOnly'],\n    skip: ['sk.ip']\n  }\n})\n```\n\n## Development\n\nInstall [Yarn](https://yarnpkg.com/en/) and install the dependencies - `yarn install`.\n\nRun the tests with `yarn test` (uses [Jest](https://facebook.github.io/jest/)).\n\nThis project uses [semantic-release](https://github.com/semantic-release/semantic-release) for automated NPM package publishing.\n\nThe main caveat: instead of running `git commit`, run `yarn commit` and follow the prompts to input a conventional changelog message via [commitizen](https://github.com/commitizen/cz-cli).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacklinu%2Fdanger-plugin-no-test-shortcuts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacklinu%2Fdanger-plugin-no-test-shortcuts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacklinu%2Fdanger-plugin-no-test-shortcuts/lists"}