Comparing version 0.0.1 to 0.1.0
'use strict'; | ||
module.exports = function (grunt) { | ||
grunt.initConfig({ | ||
jshint: { | ||
files: [ '**/*.js', '!node_modules/**/*.js', '!public/**/*.js' ], | ||
options: { | ||
jshintrc: 'jshint.json' | ||
} | ||
}, | ||
var tourism = require('tourism'); | ||
mochaTest: { | ||
files: ['test/**/*.js'] | ||
}, | ||
mochaTestConfig: { | ||
options: { | ||
reporter: 'spec', | ||
ui: 'tdd' | ||
} | ||
}, | ||
watch: { | ||
options: { | ||
files: [ '**/*.js', '!node_modules/**/*.js' ], | ||
tasks: [ 'default' ], | ||
interrupt: true | ||
} | ||
} | ||
}); | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
grunt.loadNpmTasks('grunt-mocha-test'); | ||
grunt.registerTask('default', [ 'jshint', 'mochaTest' ]); | ||
}; | ||
module.exports = tourism({ | ||
analyse: { | ||
server: [ '**/*.js', '!node_modules/**/*.js' ] | ||
}, | ||
test: { | ||
server: [ 'test/**/*.js' ] | ||
} | ||
}); |
@@ -17,3 +17,5 @@ 'use strict'; | ||
temp.mkdir(null, function (err, directory) { | ||
if (err) { return callback(err); } | ||
if (err) { | ||
return callback(err); | ||
} | ||
@@ -29,7 +31,11 @@ if (!files) { | ||
fs.copy(fileWithPath, path.join(directory, fileWithoutPath), function (err) { | ||
if (err) { return callback(err); } | ||
if (err) { | ||
return callback(err); | ||
} | ||
callback(null); | ||
}); | ||
}, function (err) { | ||
if (err) { return callback(err); } | ||
if (err) { | ||
return callback(err); | ||
} | ||
callback(null, directory); | ||
@@ -40,2 +46,2 @@ }); | ||
module.exports = isolated; | ||
module.exports = isolated; |
{ | ||
"name": "isolated", | ||
"version": "0.0.1", | ||
"version": "0.1.0", | ||
"description": "isolated provider one-time folders for unit tests.", | ||
"author": "Golo Roden <webmaster@goloroden.de> (http://www.goloroden.de)", | ||
"contributors": [ | ||
{ | ||
"name": "Golo Roden", | ||
"email": "golo.roden@thenativeweb.io" | ||
} | ||
], | ||
"main": "lib/isolated.js", | ||
"dependencies": { | ||
"async": "0.2.7", | ||
"fs-extra": "0.6.0", | ||
"temp": "0.5.0", | ||
"underscore": "1.4.4" | ||
"async": "0.9.0", | ||
"fs-extra": "0.9.1", | ||
"temp": "0.8.0", | ||
"underscore": "1.6.0" | ||
}, | ||
"devDependencies": { | ||
"grunt": "0.4.0", | ||
"grunt-contrib-jshint": "0.1.1", | ||
"grunt-contrib-watch": "0.2.0", | ||
"grunt-mocha-test": "0.2.0", | ||
"node-assertthat": "0.0.17" | ||
"grunt": "0.4.5", | ||
"node-assertthat": "0.2.0", | ||
"tourism": "0.1.0" | ||
}, | ||
"scripts": { | ||
"test": "mocha" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/goloroden/isolated.git" | ||
} | ||
} | ||
}, | ||
"license": "MIT" | ||
} |
# isolated | ||
isolated provider one-time folders for unit tests. | ||
isolated provides one-time folders for unit tests. | ||
@@ -39,4 +39,2 @@ ## Installation | ||
Then you can use it within your tests. In its simplest form, isolated provides a one-time folder for your test and guarantees to clean up later. | ||
```javascript | ||
@@ -50,10 +48,17 @@ test('...', function (done) { | ||
## Running the tests | ||
## Running the build | ||
isolated has been developed using TDD. To run the tests, go to the folder where you have installed isolated to and run `npm test`. You need to have [mocha](https://github.com/visionmedia/mocha) installed. | ||
This module can be built using [Grunt](http://gruntjs.com/). Besides running the tests, this also analyses the code. To run Grunt, go to the folder where you have installed isolated and run `grunt`. You need to have [grunt-cli](https://github.com/gruntjs/grunt-cli) installed. | ||
$ npm test | ||
$ grunt | ||
Additionally, this module can be built using [Grunt](http://gruntjs.com/). Besides running the tests, Grunt also analyses the code using [JSHint](http://www.jshint.com/). To run Grunt, go to the folder where you have installed isolated and run `grunt`. You need to have [grunt-cli](https://github.com/gruntjs/grunt-cli) installed. | ||
## License | ||
$ grunt | ||
The MIT License (MIT) | ||
Copyright (c) 2013-2014 the native web. | ||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
@@ -10,7 +10,9 @@ 'use strict'; | ||
var foo = path.join(__dirname, 'data', 'foo.txt'), | ||
bar = path.join(__dirname, 'data', 'bar.txt'), | ||
data = path.join(__dirname, 'data'); | ||
var bar = path.join(__dirname, 'data', 'bar.txt'), | ||
foo = path.join(__dirname, 'data', 'foo.txt'); | ||
var data = path.join(__dirname, 'data'); | ||
suite('isolated', function () { | ||
/*eslint-disable handle-callback-err*/ | ||
test('returns an empty directory.', function (done) { | ||
@@ -59,2 +61,3 @@ isolated(function (err, directory) { | ||
}); | ||
}); | ||
/*eslint-enable handle-callback-err*/ | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
3
0
63
6169
9
98
1
+ Addedasync@0.9.0(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedfs-extra@0.9.1(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedjsonfile@1.1.1(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addedncp@0.5.1(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedrimraf@2.2.82.7.1(transitive)
+ Addedtemp@0.8.0(transitive)
+ Addedunderscore@1.6.0(transitive)
+ Addedwrappy@1.0.2(transitive)
- Removedasync@0.2.7(transitive)
- Removedfs-extra@0.6.0(transitive)
- Removedgraceful-fs@1.2.3(transitive)
- Removedjsonfile@0.0.1(transitive)
- Removedmkdirp@0.3.5(transitive)
- Removedncp@0.4.2(transitive)
- Removedrimraf@2.1.4(transitive)
- Removedtemp@0.5.0(transitive)
- Removedunderscore@1.4.4(transitive)
Updatedasync@0.9.0
Updatedfs-extra@0.9.1
Updatedtemp@0.8.0
Updatedunderscore@1.6.0