Skip to content

Commit 487b9f2

Browse files
committed
start test case runner
1 parent 8b63c10 commit 487b9f2

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44
"description": "CSS value parser",
55
"keywords": [],
66
"author": "TJ Holowaychuk <tj@vision-media.ca>",
7-
"repository": { "type": "git", "url": "git://github.com/visionmedia/css-value.git" },
7+
"repository": {
8+
"type": "git",
9+
"url": "git://github.com/visionmedia/css-value.git"
10+
},
811
"dependencies": {},
912
"devDependencies": {
10-
"mocha": "*",
11-
"should": "*"
13+
"mocha": "~1.9.0",
14+
"should": "~1.2.2"
1215
},
1316
"main": "index"
1417
}

test/cases/numbers.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
exports.string = '1px 0 0 5px';
3+
4+
exports.object = [
5+
{ type: 'number', string: '1px', unit: 'px', number: 1 },
6+
{ type: 'number', string: '0', unit: '', number: 0 },
7+
{ type: 'number', string: '0', unit: '', number: 0 },
8+
{ type: 'number', string: '1px', unit: 'px', number: 5 },
9+
];

test/index.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
var fs = require('fs');
3+
var readdir = fs.readdirSync;
4+
var path = require('path');
5+
var basename = path.basename;
6+
7+
readdir('test/cases').forEach(function(file){
8+
var mod = require(path.resolve('test/cases/' + file));
9+
var title = basename(file, '.js');
10+
describe(title, function(){
11+
it('should work', function(){
12+
13+
})
14+
});
15+
});

0 commit comments

Comments
 (0)