-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite the tests, add 'files' field to the 'package.json', flatten f…
…iles structure.
- Loading branch information
alexpods
committed
Apr 12, 2015
1 parent
ccfe9cb
commit adfaaf8
Showing
7 changed files
with
67 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,38 @@ | ||
{ | ||
"name": "is-iojs", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "is-iojs determines if runtime is io.js.", | ||
"contributors": [ | ||
{ | ||
"name": "Aleksey Podskrebyshev", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Golo Roden", | ||
"email": "[email protected]" | ||
} | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "mocha test" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"main": "lib/isIojs.js", | ||
"devDependencies": { | ||
"assertthat": "0.4.2", | ||
"grunt": "0.4.5", | ||
"proxyquire": "1.3.1", | ||
"tourism": "0.13.2" | ||
"chai": "^2.2.0", | ||
"mocha": "^2.2.4", | ||
"proxyquire": "1.3.1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/alexpods/is-iojs.git" | ||
}, | ||
"keywords": [ | ||
"iojs", | ||
"io.js", | ||
"runtime", | ||
"check" | ||
], | ||
"contributors": [ | ||
{ | ||
"name": "Aleksey Podskrebyshev", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Golo Roden", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"license": "MIT" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
var expect = require('chai').expect; | ||
var proxyquire = require('proxyquire'); | ||
|
||
// TODO: Add more reliable tests. Maybe based on [dnt package](https://www.npmjs.com/package/dnt) | ||
|
||
describe('is-iojs', function() { | ||
|
||
it('should be a boolean value', function() { | ||
var isIojs = require('./index'); | ||
expect(isIojs).to.be.a('boolean'); | ||
}); | ||
|
||
it('should equal true if runtime is io.js', function() { | ||
var isIojs = proxyquire('./index', { | ||
child_process: { | ||
execSync: function() { | ||
return 'some description containing iojs.org substring'; | ||
} | ||
} | ||
}); | ||
expect(isIojs).to.equal(true); | ||
}); | ||
|
||
it('should equal false if runtime is not io.js', function() { | ||
var isIojs = proxyquire('./index', { | ||
child_process: { | ||
execSync: function() { | ||
return 'some text not containing iojs.org substring'.replace('iojs.org',''); | ||
} | ||
} | ||
}); | ||
expect(isIojs).to.equal(false); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.