Skip to content

Commit

Permalink
Using istanbul for testing instead of semicov
Browse files Browse the repository at this point in the history
  • Loading branch information
yanickrochon committed Aug 26, 2014
1 parent ebe1d22 commit 57cdaf9
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test/
.travis.yml
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
language: node_js
node_js:
- "0.11"
matrix:
fast_finish: true
script: "npm run-script test-travis"
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"name": "co-efficient",
"version": "0.3.3",
"version": "0.3.4",
"description": "An Efficient and lightweight asynchronous template Engine using `co`.",
"author": "Yanick Rochon <yanick.rochon@gmail.com>",
"main": "index.js",
"scripts": {
"test": "mocha --harmony"
"test": "mocha --harmony",
"test-cov": "node --harmony node_modules/istanbul-harmony/lib/cli.js cover node_modules/mocha/bin/_mocha",
"test-travis": "node --harmony node_modules/istanbul-harmony/lib/cli.js cover node_modules/mocha/bin/_mocha --report lcovonly"
},
"keywords": [
"template",
Expand All @@ -25,13 +27,12 @@
"dependencies": {
"co-fs": "^1.2.0",
"entities": "^1.1.1",
"error-factory": "0.0.16"
"error-factory": "0.1.0"
},
"devDependencies": {
"co": "^3.0.6",
"co-mocha": "0.0.4",
"mocha": "^1.20.1",
"semicov": "^0.1.1-2",
"co": "^3.1.0",
"co-mocha": "1.0.0",
"istanbul-harmony": "^0.3.0",
"should": "^4.0.4"
},
"license": "MIT"
Expand Down
10 changes: 0 additions & 10 deletions test/init.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@

if (!process.env.TRAVIS) {
if (typeof __cov === 'undefined') {
process.on('exit', function () {
require('semicov').report();
});
}

require('semicov').init('lib');
}

// setting globals
GLOBAL.assert = global.assert = require('assert');
21 changes: 21 additions & 0 deletions test/lib/engine.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,27 @@ describe('Test engine', function () {

});

it('should render context', function * () {
var template = '{{path.to.key.getter}}';
var context = {
path: {
to: {
key: {
get getter() {
return 'Hello World!';
}
}
}
}
};
var text;

text = yield engine.renderText(template, context);
text.should.equal('Hello World!');

});


it('should stream inline templates', function * () {
var template = '{?{foo}}bar{?{~}}null{?{/}}';
var stream = new (require('stream').PassThrough)();
Expand Down

0 comments on commit 57cdaf9

Please sign in to comment.