{"id":22604708,"url":"https://github.com/wangtao0101/jest-condition","last_synced_at":"2026-05-09T00:36:04.678Z","repository":{"id":57280259,"uuid":"147463956","full_name":"wangtao0101/jest-condition","owner":"wangtao0101","description":"An enhancer for jest it and describe to dynamic skip some suits and tests.","archived":false,"fork":false,"pushed_at":"2018-09-05T10:25:03.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T12:28:04.405Z","etag":null,"topics":["javascript","jest","skip","typescript"],"latest_commit_sha":null,"homepage":"","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/wangtao0101.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":"2018-09-05T05:22:28.000Z","updated_at":"2018-09-06T01:31:06.000Z","dependencies_parsed_at":"2022-09-19T17:01:58.883Z","dependency_job_id":null,"html_url":"https://github.com/wangtao0101/jest-condition","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangtao0101%2Fjest-condition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangtao0101%2Fjest-condition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangtao0101%2Fjest-condition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangtao0101%2Fjest-condition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wangtao0101","download_url":"https://codeload.github.com/wangtao0101/jest-condition/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246103042,"owners_count":20723892,"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":["javascript","jest","skip","typescript"],"created_at":"2024-12-08T13:10:30.618Z","updated_at":"2026-05-09T00:35:59.628Z","avatar_url":"https://github.com/wangtao0101.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jest Condition\n\nAn enhancer for jest it and describe to dynamic skip some suits and tests.\n\n## Install\n```\nnpm install jest-condition --save-dev\n```\n\nset jest config file\n```\n\"setupTestFrameworkScriptFile\": \"jest-condition\"\n```\n\nif you have your own setupTestFrameworkScriptFile, you should require jest-condition in top of you own setupTestFrameworkScriptFile;\n```\nrequire('jest-condition');\n```\n\n## Usage\n\n```\nit.condition(true)('test condition', async () =\u003e {\n});\n\n// you can also add skip or only after condition when debug\nit.condition(true).skip('test condition skip', async () =\u003e {\n});\n\nit.condition(true).only('test condition skip', async () =\u003e {\n});\n\ndescribe.condition(true)('describe condition', () =\u003e {\n});\n\ndescribe.condition(true).skip('describe condition skip', () =\u003e {\n});\n\ndescribe.condition(true).only('describe condition skip', () =\u003e {\n});\n```\n\n## Typescript\n\nuse files in tsconfig.json\n```\n{\n  \"files\": [\n    \"node_modules/jest-condition/index.d.ts\"\n  ],\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangtao0101%2Fjest-condition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwangtao0101%2Fjest-condition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangtao0101%2Fjest-condition/lists"}