{"id":32267181,"url":"https://github.com/purescript-spec/purescript-spec-discovery","last_synced_at":"2026-01-11T13:30:11.077Z","repository":{"id":39635198,"uuid":"71933517","full_name":"purescript-spec/purescript-spec-discovery","owner":"purescript-spec","description":"A purescript-spec extension that finds your specs automatically!","archived":false,"fork":false,"pushed_at":"2025-07-22T14:17:27.000Z","size":150,"stargazers_count":22,"open_issues_count":3,"forks_count":22,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-10T04:43:41.612Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PureScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/purescript-spec.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-25T19:54:09.000Z","updated_at":"2025-07-22T14:17:32.000Z","dependencies_parsed_at":"2024-06-21T02:29:20.396Z","dependency_job_id":null,"html_url":"https://github.com/purescript-spec/purescript-spec-discovery","commit_stats":null,"previous_names":["owickstrom/purescript-spec-discovery"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/purescript-spec/purescript-spec-discovery","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript-spec%2Fpurescript-spec-discovery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript-spec%2Fpurescript-spec-discovery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript-spec%2Fpurescript-spec-discovery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript-spec%2Fpurescript-spec-discovery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/purescript-spec","download_url":"https://codeload.github.com/purescript-spec/purescript-spec-discovery/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript-spec%2Fpurescript-spec-discovery/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280520822,"owners_count":26344439,"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","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-10-22T21:57:29.147Z","updated_at":"2025-10-22T21:57:30.246Z","avatar_url":"https://github.com/purescript-spec.png","language":"PureScript","readme":"# purescript-spec-discovery\n\npurescript-spec-discovery is an extension to\n[purescript-spec](https://github.com/purescript-spec/purescript-spec) that finds\nspecs automatically, given a regular expression pattern.\n\nIt only works for NodeJS environments, currently, since it's using NodeJS\nfacilities to list and load modules.\n\n## Usage\n\nInstall via Spago:\n\n```bash\nspago install spec-discovery\n```\n\nUse as main entry point:\n\n```purescript\nmodule Test.Main where\n\nimport Prelude\nimport Effect (Effect)\nimport Test.Spec.Discovery (discoverAndRunSpecs)\nimport Test.Spec.Reporter.Console (consoleReporter)\n\nmain :: Effect Unit\nmain = discoverAndRunSpecs [consoleReporter] \"\"\"My\\.Package\\..*Spec\"\"\"\n```\n\nOr, if you need more sophistication, like an alternative config or whatnot, use\nthe `discover` function to just return a list of specs and then run them in\nwhatever way you need:\n\n```purescript\nmodule Test.Main where\n\nimport Prelude\nimport Effect (Effect)\nimport Effect.Aff (launchAff_)\nimport Test.Spec.Discovery (discover)\nimport Test.Spec.Reporter.Console (consoleReporter)\nimport Test.Spec.Runner.Node (runSpecAndExitProcess)\nimport Test.Spec.Runner.Node.Config (defaultConfig)\n\nmain :: Effect Unit\nmain = launchAff_ do\n  specs \u003c- discover \"\"\"My\\.Package\\..*Spec\"\"\"\n  liftEffect $ runSpecAndExitProcess'\n    { defaultConfig: defaultConfig { timeout = Nothing }\n    , parseCLIOptions: true\n    }\n    [consoleReporter]\n    specs\n```\n\nAll modules that match the regular expression, **and have a definition\n`spec :: Spec Unit`**, will be included and run.\n\n## Contribute\n\nIf you have any issues or possible improvements please file them as\n[GitHub Issues](https://github.com/purescript-spec/purescript-spec-discovery/issues).\nPull requests requests are encouraged.\n\n## License\n\n[Mozilla Public License Version 2.0](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurescript-spec%2Fpurescript-spec-discovery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpurescript-spec%2Fpurescript-spec-discovery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurescript-spec%2Fpurescript-spec-discovery/lists"}