{"id":16592854,"url":"https://github.com/honzabrecka/karma-reporter","last_synced_at":"2025-03-16T21:30:35.065Z","repository":{"id":34438998,"uuid":"38372956","full_name":"honzabrecka/karma-reporter","owner":"honzabrecka","description":"A plugin for running clojurescript tests with Karma.","archived":false,"fork":false,"pushed_at":"2019-05-21T08:56:21.000Z","size":84,"stargazers_count":24,"open_issues_count":1,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-10T00:48:29.415Z","etag":null,"topics":["clojurescript","karma","tdd","testing"],"latest_commit_sha":null,"homepage":"","language":"Clojure","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/honzabrecka.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":"2015-07-01T13:35:26.000Z","updated_at":"2023-11-17T20:13:04.000Z","dependencies_parsed_at":"2022-09-14T06:11:32.555Z","dependency_job_id":null,"html_url":"https://github.com/honzabrecka/karma-reporter","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/honzabrecka%2Fkarma-reporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/honzabrecka%2Fkarma-reporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/honzabrecka%2Fkarma-reporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/honzabrecka%2Fkarma-reporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/honzabrecka","download_url":"https://codeload.github.com/honzabrecka/karma-reporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243830915,"owners_count":20354850,"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":["clojurescript","karma","tdd","testing"],"created_at":"2024-10-11T23:22:40.488Z","updated_at":"2025-03-16T21:30:34.780Z","avatar_url":"https://github.com/honzabrecka.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# karma-reporter [![CircleCI](https://circleci.com/gh/honzabrecka/karma-reporter/tree/master.svg?style=svg\u0026circle-token=025b76c6b99f0f2ee5997dd580444ad075442e53)](https://circleci.com/gh/honzabrecka/karma-reporter/tree/master)\n\nA plugin for running ClojureScript tests with Karma.\n\n## Installation\n\nThe easiest way is to keep karma-reporter as a dependency in your project.clj:\n\n[![Clojars Project](http://clojars.org/karma-reporter/latest-version.svg)](http://clojars.org/karma-reporter)\n\nTo be able to execute your ClojureScript tests with Karma, you have to install [karma-cljs-test](https://github.com/honzabrecka/karma-cljs-test) adapter. You can simply do it by:\n\n```\nnpm install karma-cljs-test --save-dev\n```\n\nAnd of course, you need Karma. If you haven't installed it yet, follow [these instructions](https://karma-runner.github.io/4.0/intro/installation.html).\n\n## Configuration\n\n```js\n// karma.conf.js\nmodule.exports = function(config) {\n  var root = 'target/public/dev'// same as :output-dir\n\n  config.set({\n    frameworks: ['cljs-test'],\n\n    files: [\n      root + '/goog/base.js',\n      root + '/cljs_deps.js',\n      root + '/app.js',// same as :output-to\n      {pattern: root + '/*.js', included: false},\n      {pattern: root + '/**/*.js', included: false}\n    ],\n\n    client: {\n      // main function\n      args: ['app.test_runner.run']\n    },\n\n    // singleRun set to false does not work!\n    singleRun: true\n  })\n}\n```\n\n## Usage\n\n```clojure\n(ns app.test-runner\n  (:require [jx.reporter.karma :refer-macros [run-tests run-all-tests]]\n            [foo.bar-test]))\n\n(enable-console-print!)\n\n; runs all tests in all namespaces\n(defn ^:export run-all [karma]\n  (run-all-tests karma))\n\n; runs all tests in all namespaces - only namespaces with names matching\n; the regular expression will be tested\n(defn ^:export run-all-regex [karma]\n  (run-all-tests karma #\".*-test$\"))\n\n; runs all tests in the given namespaces\n(defn ^:export run [karma]\n  (run-tests karma 'foo.bar-test))\n```\n\nTo execute tests from command line:\n\n```bash\n./node_modules/.bin/karma start\n```\n\nTo execute tests from REPL (will use `:cljs.test/default` reporter):\n\n```clojure\n(app.test-runner/run nil)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhonzabrecka%2Fkarma-reporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhonzabrecka%2Fkarma-reporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhonzabrecka%2Fkarma-reporter/lists"}