Skip to content

Commit fdf533b

Browse files
author
tower1229
committed
add test/test.js
1 parent 7bf26c2 commit fdf533b

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# front-flow-cli
22
为front-flow项目开发的命令行工具
33

4-
[![DUB](https://img.shields.io/badge/npm-v2.0.3-blue.svg?maxAge=2592000)]() [![DUB](https://img.shields.io/badge/nodejs%20support-v6.5.0-green.svg?maxAge=2592000)]() [![Website](https://img.shields.io/website-up-down-green-red/http/shields.io.svg?maxAge=2592000)](http://zangtao.org/projects/front-flow-cli/) [![DUB](https://img.shields.io/dub/l/vibe-d.svg?maxAge=2592000)]()
4+
[![DUB](https://travis-ci.org/tower1229/front-flow-cli.svg)]() [![DUB](https://img.shields.io/badge/nodejs%20support-v6.5.0-green.svg?maxAge=2592000)]() [![Website](https://img.shields.io/website-up-down-green-red/http/shields.io.svg?maxAge=2592000)](http://zangtao.org/projects/front-flow-cli/) [![DUB](https://img.shields.io/dub/l/vibe-d.svg?maxAge=2592000)]()
55

66

77
##功能

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"main": "index.js",
1717
"scripts": {
18-
"test": "echo \"Error: no test specified\" && exit 1"
18+
"test": "mocha"
1919
},
2020
"bin": {
2121
"flow": "bin/flow.js"
@@ -38,5 +38,8 @@
3838
"gulp-sourcemaps": "^2.2.0",
3939
"less-plugin-autoprefix": "^1.5.1",
4040
"ora": "^0.3.0"
41+
},
42+
"devDependencies": {
43+
"mocha": "^3.1.2"
4144
}
4245
}

test/test.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
var assert = require('assert');
2+
var pkg = require('../package.json');
3+
var v = pkg.version;
4+
describe('commond test', function() {
5+
describe('#flow -V', function() {
6+
it('should return version', function() {
7+
assert.equal(pkg.version, v);
8+
});
9+
});
10+
});

0 commit comments

Comments
 (0)