{"id":19680974,"url":"https://github.com/codewars/hspec-codewars","last_synced_at":"2026-06-09T01:01:30.023Z","repository":{"id":73890163,"uuid":"169654715","full_name":"codewars/hspec-codewars","owner":"codewars","description":"Utility functions for testing on Codewars with Hspec","archived":false,"fork":false,"pushed_at":"2020-12-10T08:00:19.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-27T07:12:09.746Z","etag":null,"topics":["code-runner","haskell","hspec","test-helpers"],"latest_commit_sha":null,"homepage":"","language":"Haskell","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/codewars.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2019-02-07T22:45:22.000Z","updated_at":"2021-02-06T11:22:49.000Z","dependencies_parsed_at":"2023-09-21T12:01:36.500Z","dependency_job_id":null,"html_url":"https://github.com/codewars/hspec-codewars","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/codewars/hspec-codewars","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewars%2Fhspec-codewars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewars%2Fhspec-codewars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewars%2Fhspec-codewars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewars%2Fhspec-codewars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codewars","download_url":"https://codeload.github.com/codewars/hspec-codewars/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewars%2Fhspec-codewars/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34086664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"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":["code-runner","haskell","hspec","test-helpers"],"created_at":"2024-11-11T18:06:34.730Z","updated_at":"2026-06-09T01:01:27.979Z","avatar_url":"https://github.com/codewars.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Test.Hspec.Codewars\n\nUtility functions for testing on Codewars with Hspec.\n\n### Blacklisting\n\n#### `Hidden`\n\n```haskell\ndata Hidden\n  -- | Module to be hidden\n  = Module {moduleName :: String}\n  -- | Symbol from a module to be hidden\n  | FromModule {moduleName :: String, symbolName :: String}\n```\n\n#### `solutionShouldHide`\n\n```haskell\nsolutionShouldHide :: Hidden -\u003e Expectation\n```\n\nCheck that solution hides a module or a symbol from a module.\n\n```haskell\nsolutionShouldHide $ FromModule \"Prelude\" \"head\"\n```\n\n#### `solutionShouldHideAll`\n\n```haskell\nsolutionShouldHideAll :: [Hidden] -\u003e Expectation\n```\n\nCheck that solution hides all of given modules and symbols.\n\n```haskell\nsolutionShouldHideAll [FromModule \"Prelude\" \"head\", Module \"Data.Set\"]\n```\n\n### Approximate Equality\n\n#### `shouldBeApprox`\n\n```haskell\nshouldBeApprox :: (Fractional a, Ord a, Show a) =\u003e a -\u003e a -\u003e Expectation\n```\n\nPredefined approximately equal expectation with error margin `1e-6`.\n\n```haskell\nsqrt 2.0 `shouldBeApprox` (1.4142135 :: Double)\n```\n\n#### `shouldBeApproxPrec`\n\n```haskell\nshouldBeApproxPrec :: (Fractional a, Ord a, Show a) =\u003e a -\u003e a -\u003e a -\u003e Expectation\n```\n\nCreate approximately equal expectation with margin.\n\n```haskell\nshouldBeApprox' = shouldBeApproxPrec 1e-9\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewars%2Fhspec-codewars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodewars%2Fhspec-codewars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewars%2Fhspec-codewars/lists"}