{"id":22004781,"url":"https://github.com/cybrox/mix-phxtest","last_synced_at":"2025-03-23T06:24:01.034Z","repository":{"id":57527872,"uuid":"133513223","full_name":"cybrox/mix-phxtest","owner":"cybrox","description":"Mix command for easily running specific tests in phoenix","archived":false,"fork":false,"pushed_at":"2018-05-17T12:00:33.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-01T17:49:07.292Z","etag":null,"topics":["elixir","elixir-mix","elixir-phoenix","mix-tasks","tdd","testing"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cybrox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-15T12:30:45.000Z","updated_at":"2018-05-17T12:00:34.000Z","dependencies_parsed_at":"2022-09-03T22:20:09.850Z","dependency_job_id":null,"html_url":"https://github.com/cybrox/mix-phxtest","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybrox%2Fmix-phxtest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybrox%2Fmix-phxtest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybrox%2Fmix-phxtest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybrox%2Fmix-phxtest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cybrox","download_url":"https://codeload.github.com/cybrox/mix-phxtest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245063212,"owners_count":20554888,"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":["elixir","elixir-mix","elixir-phoenix","mix-tasks","tdd","testing"],"created_at":"2024-11-30T00:17:12.028Z","updated_at":"2025-03-23T06:24:01.011Z","avatar_url":"https://github.com/cybrox.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mix phxtest\nMix task for running specific tests in your [phoenix](https://github.com/phoenixframework/phoenix) project via `mix test` (ex_unit) and `mix watch` ([mix-test.watch](https://github.com/lpil/mix-test.watch)) more conveniently.   \n\nLet's admit it, we're all lazy and running specific tests in a phoenix project can be a bit of a hassle when specifying the full path. I for one, would prefer to strip the boilerplate text from the command. So, here's a fitting library.\n\n```\n# Stop doing this\n$ mix test test/myapp_web/controllers/resource_controller.exs:12\n\n# Start doing this\n$ mix phxtest c resource 12\n```\n\nJust add `mix_phxtest` as a dependency to your project via [hex.pm](https://hex.pm/packages/mix_phxtest)    \n```\n{:mix_phxtest, \"~\u003e 0.2.2\", only: [:test]}\n```\n\n### Usage\n```\nUsage: mix phxtest \u003ctype\u003e \u003cname\u003e [line]\n       mix phxwatch \u003ctype\u003e \u003cname\u003e [line]\n\ntype:  c - controller (/test/myapp_web/controllers/)\n       v - view       (/test/myapp_web/views/)\n       p - plug       (/test/myapp_web/plug/)\n       w - web        (/test/myapp_web/)\n       l - lib        (/test/myapp/)\n\nname:  The name of your file, you can add additional\n       subdirectories here, if needed.\n\nline:  The line of the test, if you only want to execute\n       a single test. This is optional.\n       \n\nidea:  The phx.test and phxwatch are just aliases that\n       perform simple string interpolation. The commands\n       you are generating are composed like this:\n       $ mix phxtest c user 12\n       $ mix test /test/controllers/user_controller_test.exs:12\n```\n\nHint: You can access nested tests by putting the path in the name parameter:\n```\n$ mix phxtest c device/mobile 11\n\n# Will become\n$ mix test test/myapp_web/controllers/device/mobile_controller_test.exs:11\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcybrox%2Fmix-phxtest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcybrox%2Fmix-phxtest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcybrox%2Fmix-phxtest/lists"}