diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1a91d38 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.idea/ +node_modules/ +*~ + diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..76fd222 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +language: node_js +node_js: + - "0.12" + - "0.11" + - "0.10" + #- "0.8" + #- "0.6" + - "iojs" + - "iojs-v1.0.4" + +before_install: + - "npm install -g mocha" + - "npm install chai" + +notifications: + email: false diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..cd8a75c --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +# for testing +.PHONY: test +test: + mocha \ No newline at end of file diff --git a/README.md b/README.md index 784f2d2..8bd392b 100644 --- a/README.md +++ b/README.md @@ -1 +1,68 @@ +# Testing Concepts, Framework and Strategies + +[![Build Status](https://travis-ci.org/MAP-NCU2015/Lesson-04-Testing.svg)](https://travis-ci.org/MAP-NCU2015/Lesson-04-Testing) + +Introduction of testing concept, strategies and current used testing framework in Mozilla. Students are expected to learn the importance of unit tests and know how to write good one. + +- [Wiki Page](https://wiki.mozilla.org/Firefox_OS/AcademyNCU2015) + by Askeing Yen & Shing Lyu + + +## Creating your Pull Request + +Before you begin, [set up your Git](https://help.github.com/articles/set-up-git/). + +### 1. Create your fork and local clone + +You have to **fork** this repository, then navigate to your fork repository. + +In the right sidebar of **your repository**, copy the `HTTPS clone URL`. + +Open terminal. Change folder to your home (or other workspace folder). +```bash +$ cd ~ +``` + +You can create a local clone of your fork. (You can paste the URL you copied before.) +```bash +$ git clone https://github.com/YOUR_ACCOUNT/Lesson-04-Testing.git +``` + +Now you have a local clone of your fork repository. +```bash +$ cd Lesson-04-Testing +``` + +### 2. Complete your work on your local clone + +Writing your code and tests. + +Running `mocha` locally to make sure your tests will pass. + +Then you can commit, and push your changes to your fork repository. + +(If possible, using `git branch` to manage your changes.) + +### 3. Create the Pull Request + +Navigate to **your repository**, switch to the branch which has your changes. + +Click `Compare, review, create a pull request` button (a green button). + +You are presented with a review page. + +Type the title (**Your Student ID Number**) and description for your Pull Request. + +Click `Create pull request`. + +### Reference + +For more detail, please see the following articles. + +* https://help.github.com/ +* https://help.github.com/articles/set-up-git/ +* https://help.github.com/articles/fork-a-repo/ +* https://help.github.com/articles/managing-branches-in-your-repository/ +* https://help.github.com/articles/creating-a-pull-request/ +* https://help.github.com/articles/using-pull-requests/ diff --git a/package.json b/package.json index f01fb39..d727f6d 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "description": "Demostrates why auto testing is important", "scripts": { - "test": "./node_modules/mocha/bin/mocha" + "test": "make test" }, "author": "Askeing Yen & Shing Lyu", "license": "MPLv2",