start a test suite
This commit is contained in:
parent
18c6fc6cef
commit
450e4eb434
4 changed files with 37 additions and 3 deletions
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
## bunyan 0.5.2 (not yet released)
|
## bunyan 0.5.2 (not yet released)
|
||||||
|
|
||||||
(nothing yet)
|
- Start a test suite.
|
||||||
|
|
||||||
|
|
||||||
## bunyan 0.5.1
|
## bunyan 0.5.1
|
||||||
|
|
||||||
|
|
15
Makefile
15
Makefile
|
@ -1,12 +1,25 @@
|
||||||
|
|
||||||
|
#---- Tools
|
||||||
|
|
||||||
|
TAP := ./node_modules/.bin/tap
|
||||||
|
|
||||||
|
|
||||||
|
#---- Targets
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
|
||||||
# Ensure jsontool.js and package.json have the same version.
|
# Ensure all version-carrying files have the same version.
|
||||||
|
.PHONY: versioncheck
|
||||||
versioncheck:
|
versioncheck:
|
||||||
[[ `cat package.json | json version` == `grep '^var VERSION' bin/bunyan | awk -F'"' '{print $$2}'` ]]
|
[[ `cat package.json | json version` == `grep '^var VERSION' bin/bunyan | awk -F'"' '{print $$2}'` ]]
|
||||||
[[ `cat package.json | json version` == `grep '^var VERSION' lib/bunyan.js | awk -F'"' '{print $$2}'` ]]
|
[[ `cat package.json | json version` == `grep '^var VERSION' lib/bunyan.js | awk -F'"' '{print $$2}'` ]]
|
||||||
@echo Version check ok.
|
@echo Version check ok.
|
||||||
|
|
||||||
|
.PHONY: cutarelease
|
||||||
cutarelease: versioncheck
|
cutarelease: versioncheck
|
||||||
./tools/cutarelease.py -p bunyan -f package.json -f lib/bunyan.js -f bin/bunyan
|
./tools/cutarelease.py -p bunyan -f package.json -f lib/bunyan.js -f bin/bunyan
|
||||||
|
|
||||||
|
.PHONY: test
|
||||||
|
test: $(TAP)
|
||||||
|
TAP=1 $(TAP) test/*.test.js
|
||||||
|
|
||||||
|
|
|
@ -12,5 +12,9 @@
|
||||||
"url": "git://github.com/trentm/node-bunyan.git"
|
"url": "git://github.com/trentm/node-bunyan.git"
|
||||||
},
|
},
|
||||||
"engines": ["node >=0.4.0"],
|
"engines": ["node >=0.4.0"],
|
||||||
"keywords": ["log", "logging", "log4j", "json"]
|
"keywords": ["log", "logging", "log4j", "json"],
|
||||||
|
|
||||||
|
"devDependencies": {
|
||||||
|
"tap": "0.2.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
16
test/ctor.test.js
Normal file
16
test/ctor.test.js
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2012, Trent Mick. All rights reserved.
|
||||||
|
*
|
||||||
|
* Test type checking on creation of the Logger.
|
||||||
|
*/
|
||||||
|
|
||||||
|
var test = require('tap').test;
|
||||||
|
var Logger = require('../lib/bunyan');
|
||||||
|
|
||||||
|
|
||||||
|
test("douglas adams", function(t) {
|
||||||
|
t.ok(42, "the answer to life the universe and everything");
|
||||||
|
t.end();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue