{"id":18539106,"url":"https://github.com/simov/loca","last_synced_at":"2025-07-04T19:33:23.013Z","repository":{"id":17939553,"uuid":"20917078","full_name":"simov/loca","owner":"simov","description":"WebKit reporter for Mocha","archived":false,"fork":false,"pushed_at":"2017-06-02T15:40:14.000Z","size":112,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T11:04:08.845Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/simov.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":"2014-06-17T09:08:15.000Z","updated_at":"2017-09-24T22:11:45.000Z","dependencies_parsed_at":"2022-09-24T20:01:14.216Z","dependency_job_id":null,"html_url":"https://github.com/simov/loca","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/simov/loca","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simov%2Floca","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simov%2Floca/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simov%2Floca/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simov%2Floca/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simov","download_url":"https://codeload.github.com/simov/loca/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simov%2Floca/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263606740,"owners_count":23487686,"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":[],"created_at":"2024-11-06T19:46:16.781Z","updated_at":"2025-07-04T19:33:22.980Z","avatar_url":"https://github.com/simov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# loca\n\n![Loca][4]\n\n\n## browser\n\n### [live demo][3]\n\n### example\n\n```js\nvar should = chai.should();\n// mocha.reporter('webkit'); // in case this got merged in\nmocha.reporter(mocha.WebKit);\n\nmocha.setup({\n  ui: 'bdd',\n  globals: ['']\n});\n\ndescribe('test suite', function () {\n  it('...', function () {});\n});\n\nmocha.run();\n\n```\n\n\n## node-webkit\n\n### run\n\n```bash\n$ cd reporter/nw/\n$ nw .\n```\n\n### example\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n  \u003cmeta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\" /\u003e\n  \u003ctitle\u003eNode WebKit Mocha Reporter\u003c/title\u003e\n\n  \u003cscript type=\"text/javascript\" charset=\"utf-8\"\u003e\n    // show the dev tools by default\n    require('nw.gui').Window.get().showDevTools().resizeTo(800, 1000);\n\n    // programatically\n    var should = require('should');\n    var Mocha = require('mocha'),\n      fs = require('fs'),\n      path = require('path');\n\n    // First, you need to instantiate a Mocha instance.\n    var mocha = new Mocha;\n    // mocha.reporter('webkit'); // in case this got merged in\n    mocha.reporter(require('loca'));\n\n    // Then, you need to use the method \"addFile\" on the mocha\n    // object for each file.\n\n    // Here is an example:\n    fs.readdirSync('test').filter(function (file) {\n      // Only keep the .js files\n      return file.substr(-3) === '.js';\n\n    }).forEach(function (file) {\n      // Use the method \"addFile\" to add the file to mocha\n      mocha.addFile(\n        path.join('test', file)\n      );\n    });\n\n    // Now, you can run the tests.\n    mocha.run(function (failures) {\n      process.on('exit', function () {\n        process.exit(failures);\n      });\n    });\n  \u003c/script\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n## more info\n\n- [mocha original issue][2]\n- [mocha pull request][1]\n\n## license\n\nMIT\n\n\n  [1]: https://github.com/visionmedia/mocha/pull/1246\n  [2]: https://github.com/visionmedia/mocha/issues/960#issuecomment-46750530\n  [3]: http://simov.github.io/loca/reporter/browser/\n  [4]: http://i.imgur.com/dFvQRtE.png\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimov%2Floca","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimov%2Floca","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimov%2Floca/lists"}