{"id":51400675,"url":"https://github.com/tea3/js-test-practice","last_synced_at":"2026-07-04T06:07:06.630Z","repository":{"id":199197887,"uuid":"98181554","full_name":"tea3/js-test-practice","owner":"tea3","description":"javascript test practice","archived":false,"fork":false,"pushed_at":"2017-09-13T05:28:17.000Z","size":171,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-10-10T07:25:57.481Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/tea3.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,"governance":null}},"created_at":"2017-07-24T11:02:54.000Z","updated_at":"2020-04-04T20:04:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"918cc39e-a4b2-4dcb-9716-01ffd91ccacf","html_url":"https://github.com/tea3/js-test-practice","commit_stats":null,"previous_names":["tea3/js-test-practice"],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/tea3/js-test-practice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tea3%2Fjs-test-practice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tea3%2Fjs-test-practice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tea3%2Fjs-test-practice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tea3%2Fjs-test-practice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tea3","download_url":"https://codeload.github.com/tea3/js-test-practice/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tea3%2Fjs-test-practice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35111476,"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-07-04T02:00:05.987Z","response_time":113,"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":"2026-07-04T06:07:05.941Z","updated_at":"2026-07-04T06:07:06.622Z","avatar_url":"https://github.com/tea3.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n[![Build Status](https://travis-ci.org/tea3/js-test-practice.svg?branch=master)](https://travis-ci.org/tea3/js-test-practice) [![Coverage Status](https://img.shields.io/coveralls/tea3/js-test-practice.svg)](https://coveralls.io/r/tea3/js-test-practice?branch=master) \u003c!--[![NPM version](https://badge.fury.io/js/mocha-test.svg)](http://badge.fury.io/js/mocha-test)--\u003e\n\n# js-test-practice\n\njavascript(ES6)のテスト環境とTravis CIの練習です。\n\n記事： [javascriptのテストとコード構文チェックに必要なもの。mocha・eslint・istanbul・power-assertの概要](https://photo-tea.com/p/17/javascript-test-how-to-1/)\n\n## 使い方\n\nNode.js v8 以上で動作します。\n\n```\n$ git clone\n$ nvm install 8.2.1\n$ nvm use 8.2.1\n$ npm install\n```\n\n各テストは以下のコマンドで実行できます。\n\n```\n$ npm run test\n$ npm run test-cov\n$ npm run eslint\n```\n\n- `test`: mochaによるテストです。\n- `test-cov`: istanbulによるmochaテストと、カバレッジ取得をします。\n- `eslint`: eslintで文法チェックを行います。\n\nTravis CIにより、リポジトリpushのタイミングで`eslint`と`test-cov`が実行されます。\n\n---\n\n## 参考記事\n\n### テストの書き方、使い方\n\n- [mochaとchaiの最も基本的な使い方 | 30歳からのプログラミング](http://numb86-tech.hatenablog.com/entry/2016/06/08/155834)\n- [node.jsのいろいろなモジュール22 – mochaでテストを書こう | Developers.IO](http://dev.classmethod.jp/server-side/node-mocha/)\n- [power-assertの使い方 Node.js編 | Web Scratch](http://efcl.info/2014/0406/res3809/)\n- [ユニットテストにpower-assertを使う | 四角革命前夜](https://blog.sasaplus1.com/2015/01/11/02/)\n\n\n### githubの自動テスト\n\n- [Travis CIで自動テスト | Qiita](http://qiita.com/sugarshin/items/0b09dfb7c4a4a68e5da0)\n- [Travis CIを使ってnpmを継続的に公開・メンテナンスするよ | Qiita](http://qiita.com/KamataRyo/items/6e795c6734f9a775f5a6)\n\n\n### カバレッジ(テスト網羅率)について\n\n- [(ruby)Travis CIとCoverallsとCode Climateを使ってGitHubリポジトリにバッジを付ける | アインシュタインの電話番号](http://blog.ruedap.com/2013/09/02/travis-ci-coveralls-code-climate-github-badge)\n- [Node.jsの開発を超速化するGitHub連携 三種の神器 (Travis CI・Coveralls・David) | teppeis blog](http://teppeis.hatenablog.com/entry/2013/12/node-github)\n\n#### カバレッジを取得するistanbulについて\n\n- [istanbul + mocha設定メモ | なっく日報](http://yukidarake.hateblo.jp/entry/2015/06/29/202652)\n- [Mocha + Istanbulでテストしてコードカバレッジを取得する | Safx](http://safx-dev.blogspot.jp/2013/09/mocha-istanbul.html)\n\n#### Javascriptの構文チェック\n\nESLint \u003c[デモ](http://eslint.org/demo/)・[ルール一覧](http://eslint.org/docs/rules/)\u003e\n\n- [ESLintでJavaScriptの構文チェックを始める | Tips Note by TAM](https://www.tam-tam.co.jp/tipsnote/javascript/post9944.html)\n- [ESLint 最初の一歩 | Qiita](http://qiita.com/mysticatea/items/f523dab04a25f617c87d)\n- [ESLintについてのメモ | Qiita](http://qiita.com/makotot/items/822f592ff8470408be18)\n- [ESLint のカスタムルールを作ろう! (その1) | Qiita](http://qiita.com/mysticatea/items/cc3f648e11368799e66c)\n- [ESLint v3.5.0 リリース、JSCS との関係 | ミツエーリンクス フロントエンドBlog](https://www.mitsue.co.jp/knowledge/blog/frontend/201609/12_1213.html)\n\n#### Sublime textでESlintを使う\n\n- [roadhump/SublimeLinter-eslint](https://github.com/roadhump/SublimeLinter-eslint)をインストールして使う\n- [Sublime Text3 lintエラーをリアルタイム表示してjavascriptの実装を少しだけ効率化 | Qiita](http://qiita.com/etet-etet/items/3c939ed07d22474e4f28)\n\n※eslintの設定を共用するには記事「[ESLint 最初の一歩 | Qiita](http://qiita.com/mysticatea/items/f523dab04a25f617c87d)」の「Shareable Config (共有設定) を使う」や[共有設定でらくらく ESLint | Qiita](http://qiita.com/mysticatea/items/dc35ced6bd5e782f50cd)が参考になる？\n\n### その他\n\n- [jscs – 奇麗なコードを書こう。JavaScriptコーディングスタイルチェッカー | moongift](http://www.moongift.jp/2013/11/jscs-%E5%A5%87%E9%BA%97%E3%81%AA%E3%82%B3%E3%83%BC%E3%83%89%E3%82%92%E6%9B%B8%E3%81%93%E3%81%86%E3%80%82javascript%E3%82%B3%E3%83%BC%E3%83%87%E3%82%A3%E3%83%B3%E3%82%B0%E3%82%B9%E3%82%BF%E3%82%A4/)\n- [npmにライブラリをアップロードするときに.npmignoreで生成物を公開/制限するパターン | Qiita](http://qiita.com/mizchi/items/bf2da480b0a7f216ba78)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftea3%2Fjs-test-practice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftea3%2Fjs-test-practice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftea3%2Fjs-test-practice/lists"}