https://github.com/fbukevin/testtravis
https://github.com/fbukevin/testtravis
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fbukevin/testtravis
- Owner: fbukevin
- Created: 2015-09-15T10:27:07.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-09-16T03:32:25.000Z (almost 11 years ago)
- Last Synced: 2025-02-26T10:16:40.369Z (over 1 year ago)
- Language: JavaScript
- Size: 160 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://travis-ci.org/fbukevin/testTravis)
* 至少要有三個檔案:
1. package.json
```
{
"scripts": {
"test": "mocha testMocha.js testChai.js testSinon.js"
},
"dependencies": {
"chai": "^3.2.0",
"sinon": "^1.16.1"
}
}
```
2. .travis.yml
```
language: node_js
node_js:
- "0.10"
before_install: npm install mocha -g &&
npm install chai &&
npm install sinon
```
3. test.js
* 接著你要到 Travis-CI 上去開起這個專案的 GitHub 連接
* 最後,每當你 push 一版到 GitHub,Travis 就會自動啟動測試,並將測試結果寄送到你的 email
* 如果測試程式沒有變動的(例如 README.md, package.json 的變動),不會觸發 Travis-CI