Permalink
Browse files

add better tests

  • Loading branch information...
1 parent a2b4559 commit 963380b1e48d8b28f3012fe18c3bf46d49360cdf @tj committed Jul 19, 2012
View
@@ -6,7 +6,8 @@ all: ejs.min.js
test:
@./node_modules/.bin/mocha \
- --ui exports
+ --require should \
+ --reporter spec
ejs.js: $(SRC)
@node support/compile.js $^
View
@@ -208,7 +208,7 @@ var compile = exports.compile = function(str, options){
if (options.debug) console.log(str);
var fn = new Function('locals, filters, escape', str);
return function(locals){
- return fn.call(this, locals, filters, utils.escape);
+ return fn.call(this, locals || {}, filters, utils.escape);
}
};
View
@@ -5,7 +5,8 @@
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"keywords": ["template", "engine", "ejs"],
"devDependencies": {
- "mocha": "*"
+ "mocha": "*",
+ "should": "*"
},
"main": "./lib/ejs.js",
"repository": "git://github.com/visionmedia/ejs.git"
Oops, something went wrong.

0 comments on commit 963380b

Please sign in to comment.