Browse files

fs.existsSync

  • Loading branch information...
1 parent 4aac44e commit 72d16146540fc01bfa7090585ed74f0b64b01b04 @sdolard committed Dec 6, 2012
Showing with 44 additions and 45 deletions.
  1. +1 −2 .travis.yml
  2. +36 −36 package.json
  3. +3 −3 test/vows-logtofile-backup.js
  4. +3 −3 test/vows-logtofile-gz.js
  5. +1 −1 test/vows-logtofile.js
View
3 .travis.yml
@@ -1,4 +1,3 @@
language: node_js
node_js:
- - 0.6
- - 0.7
+ - 0.8
View
72 package.json
@@ -1,38 +1,38 @@
{
- "name": "logtofile",
- "description": "A simple log writer. Rotation and compression (gzip) are supported.",
- "version": "0.1.4",
- "author": "Sebastien Dolard <sdolard@gmail.com>",
- "email": "sdolard@gmail.com",
- "keywords": [
- "log",
- "writter",
- "rotation"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/sdolard/node-logtofile.git"
- },
- "main": "lib/logtofile",
- "license": "MIT",
- "scripts": {
- "test": "vows test/vows*.js --spec"
- },
- "engines": {
- "node": ">= 0.6.0"
- },
- "bugs": {
- "url": "https://github.com/sdolard/node-logtofile/issues"
- },
- "licenses": [
- {
- "type": "MIT",
- "url": "https://raw.github.com/sdolard/node-logtofile/master/LICENSE"
- }
- ],
- "dependencies": {
- "vows": ">= 0.6.2"
- },
- "devDependencies": {},
- "homepage": "http://github.com/sdolard/node-logtofile"
+ "name": "logtofile",
+ "description": "A simple log writer. Rotation and compression (gzip) are supported.",
+ "version": "0.1.4",
+ "author": "Sebastien Dolard <sdolard@gmail.com>",
+ "email": "sdolard@gmail.com",
+ "keywords": [
+ "log",
+ "writter",
+ "rotation"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/sdolard/node-logtofile.git"
+ },
+ "main": "lib/logtofile",
+ "license": "MIT",
+ "scripts": {
+ "test": "vows test/vows*.js --spec"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "bugs": {
+ "url": "https://github.com/sdolard/node-logtofile/issues"
+ },
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://raw.github.com/sdolard/node-logtofile/master/LICENSE"
+ }
+ ],
+ "dependencies": {
+ "vows": ">= 0.6.2"
+ },
+ "devDependencies": {},
+ "homepage": "http://github.com/sdolard/node-logtofile"
}
View
6 test/vows-logtofile-backup.js
@@ -33,13 +33,13 @@ exports.suite1 = vows.describe('logtofile backup').addBatch({
},
"It creates a backup file": function (log, oldFilePath, newFilePath) {
- assert.isTrue(path.existsSync(newFilePath));
+ assert.isTrue(fs.existsSync(newFilePath));
},
"Backup content is correct": function (log, oldFilePath, newFilePath) {
assert.strictEqual(fs.readFileSync(newFilePath, 'utf8'), dataTest);
},
"It removes old file": function (log, oldFilePath, newFilePath) {
- assert.isFalse(path.existsSync(oldFilePath));
+ assert.isFalse(fs.existsSync(oldFilePath));
}
}
}).
@@ -49,7 +49,7 @@ addBatch({
setTimeout(this.callback, 100); // must be async
},
"it creates a new empty file": function () {
- assert.isTrue(path.existsSync(testFilePath));
+ assert.isTrue(fs.existsSync(testFilePath));
}
}
}).
View
6 test/vows-logtofile-gz.js
@@ -34,10 +34,10 @@ exports.suite1 = vows.describe('logtofile gz').addBatch({
},
"It creates a gz file": function (log, oldFilePath, newFilePath) {
- assert.isTrue(path.existsSync(newFilePath));
+ assert.isTrue(fs.existsSync(newFilePath));
},
"It removes old file": function (log, oldFilePath, newFilePath) {
- assert.isFalse(path.existsSync(testFilePath));
+ assert.isFalse(fs.existsSync(testFilePath));
}
}
}).
@@ -64,7 +64,7 @@ addBatch({
setTimeout(this.callback, 100); // must be async
},
"it creates a new empty file": function () {
- assert.isTrue(path.existsSync(testFilePath));
+ assert.isTrue(fs.existsSync(testFilePath));
}
}
}).
View
2 test/vows-logtofile.js
@@ -97,7 +97,7 @@ exports.suite1 = vows.describe('logtofile basic').addBatch({
},
"It writes in a new file": function (p) {
assert.strictEqual(p, testFilePath);
- assert.isTrue(path.existsSync(p));
+ assert.isTrue(fs.existsSync(p));
},
"Written data are correct": function (p) {

0 comments on commit 72d1614

Please sign in to comment.