Permalink
Browse files

remove semicolons

  • Loading branch information...
1 parent 8e3ae86 commit 64fb0cd42c00ddb4369d989e02205e6d02f95f23 @eldargab committed Feb 22, 2013
Showing with 29 additions and 29 deletions.
  1. +27 −27 lib/fake-fs.js
  2. +2 −2 test/fake-fs.js
View
@@ -66,11 +66,11 @@ Fs.prototype._get = function (path) {
}
Fs.prototype._rem = function (path) {
- var parent = this._get(dirname(path));
- if (!parent.isDirectory()) throw FsError('ENOTDIR');
+ var parent = this._get(dirname(path))
+ if (!parent.isDirectory()) throw FsError('ENOTDIR')
- var itemName = basename(path);
- delete parent.childs[itemName];
+ var itemName = basename(path)
+ delete parent.childs[itemName]
}
@@ -112,45 +112,45 @@ Fs.prototype.mkdirSync = function (dir, mode) {
}
Fs.prototype.rmdirSync = function (path) {
- if (!this.existsSync(path)) throw FsError('ENOENT');
+ if (!this.existsSync(path)) throw FsError('ENOENT')
- var item = this._get(path);
- if (!item.isDirectory()) throw FsError('ENOTDIR');
+ var item = this._get(path)
+ if (!item.isDirectory()) throw FsError('ENOTDIR')
- var parent = this._get(dirname(path));
- updateTimes(parent);
- this._rem(path);
+ var parent = this._get(dirname(path))
+ updateTimes(parent)
+ this._rem(path)
}
Fs.prototype.unlinkSync = function (path) {
- if (!this.existsSync(path)) throw FsError('ENOENT');
+ if (!this.existsSync(path)) throw FsError('ENOENT')
- var item = this._get(path);
- if (item.isDirectory()) throw FsError('EISDIR');
+ var item = this._get(path)
+ if (item.isDirectory()) throw FsError('EISDIR')
- var parent = this._get(dirname(path));
- updateTimes(parent);
- this._rem(path);
+ var parent = this._get(dirname(path))
+ updateTimes(parent)
+ this._rem(path)
}
Fs.prototype.renameSync = function (oldPath, newPath) {
- if (!this.existsSync(oldPath)) throw FsError('ENOENT');
+ if (!this.existsSync(oldPath)) throw FsError('ENOENT')
if (this.existsSync(newPath) && this.statSync(newPath).isDirectory())
- throw FsError('EPERM');
+ throw FsError('EPERM')
- var newParent = this._get(dirname(newPath));
- if (!newParent.isDirectory()) throw FsError('ENOTDIR');
+ var newParent = this._get(dirname(newPath))
+ if (!newParent.isDirectory()) throw FsError('ENOTDIR')
- var fileOrDir = this._get(oldPath);
+ var fileOrDir = this._get(oldPath)
- var oldParent = this._get(dirname(oldPath));
- updateTimes(oldParent);
- this._rem(oldPath);
+ var oldParent = this._get(dirname(oldPath))
+ updateTimes(oldParent)
+ this._rem(oldPath)
- updateTimes(newParent);
- this._add(newPath, fileOrDir);
+ updateTimes(newParent)
+ this._add(newPath, fileOrDir)
}
;['readdir', 'stat', 'rmdir', 'unlink'].forEach(function (meth) {
@@ -215,7 +215,7 @@ Fs.prototype.mkdir = function (dir, mode, cb) {
Fs.prototype.rename = function (oldPath, newPath, cb) {
var res, err
try {
- res = this.renameSync(oldPath, newPath);
+ res = this.renameSync(oldPath, newPath)
} catch (e) {
err = e
}
View
@@ -355,7 +355,7 @@ describe('Fake FS', function () {
it('Should throw ENOTDIR when new path points to a parent that is not a directory', function () {
fs.dir('a/b')
- fs.file('c');
+ fs.file('c')
fs.rename('a/b', 'c/d', cb)
@@ -385,7 +385,7 @@ describe('Fake FS', function () {
done()
})
})
- });
+ })
describe('.readFile()', function () {
it('Should read file contents', function () {

0 comments on commit 64fb0cd

Please sign in to comment.