From 499c72daaf8244862bdf1570ac8c577025bf4d89 Mon Sep 17 00:00:00 2001 From: rhayes2 Date: Sun, 23 Sep 2018 21:19:57 -0400 Subject: [PATCH 1/7] saving for lineending dumbness --- package-lock.json | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7524475..d76a628 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3278,12 +3278,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3298,17 +3300,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -3425,7 +3430,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -3437,6 +3443,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -3451,6 +3458,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -3458,12 +3466,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -3482,6 +3492,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -3562,7 +3573,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -3574,6 +3586,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -3695,6 +3708,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", From 546b4567d279f90db5bce18de8d27833927891dc Mon Sep 17 00:00:00 2001 From: rhayes2 Date: Mon, 24 Sep 2018 14:16:16 -0400 Subject: [PATCH 2/7] Added Test for CHMODE --- tests/spec/fs.chmod.spec.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/spec/fs.chmod.spec.js b/tests/spec/fs.chmod.spec.js index 800f18f..759ef6c 100644 --- a/tests/spec/fs.chmod.spec.js +++ b/tests/spec/fs.chmod.spec.js @@ -39,6 +39,20 @@ describe('fs.chmod, fs.fchmod', function() { }); }); + it('Should be a valid mode value to set permissions', function(done){ + var fs = util.fs(); + fs.mkdir('/file',function(err, ed) { + if(err) throw err; + fs.chmod(ed, 1000, function(err) { + expect(err).to.exist; + expect(err.code).to.equal('EINVAL'); + done(); + }); + }); + }); + + + it('should allow for updating mode of a given file', function(done) { var fs = util.fs(); From 294685d6cba920c672587164a7a51ffd5cf48e00 Mon Sep 17 00:00:00 2001 From: rhayes2 Date: Tue, 25 Sep 2018 00:15:07 -0400 Subject: [PATCH 3/7] Style fix --- .eslintrc.json | 2 +- tests/spec/fs.chmod.spec.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 84787e1..d05146e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -18,7 +18,7 @@ ], "linebreak-style": [ "error", - "unix" + "windows" ], "quotes": [ "error", diff --git a/tests/spec/fs.chmod.spec.js b/tests/spec/fs.chmod.spec.js index 759ef6c..0f7f166 100644 --- a/tests/spec/fs.chmod.spec.js +++ b/tests/spec/fs.chmod.spec.js @@ -39,11 +39,13 @@ describe('fs.chmod, fs.fchmod', function() { }); }); - it('Should be a valid mode value to set permissions', function(done){ + it('should be a valid mode value to set permissions', function(done){ var fs = util.fs(); - fs.mkdir('/file',function(err, ed) { + + fs.mkdir('/file',function(err) { if(err) throw err; - fs.chmod(ed, 1000, function(err) { + + fs.chmod('file', 1000, function(err) { expect(err).to.exist; expect(err.code).to.equal('EINVAL'); done(); @@ -51,8 +53,6 @@ describe('fs.chmod, fs.fchmod', function() { }); }); - - it('should allow for updating mode of a given file', function(done) { var fs = util.fs(); From 7f155a0f4011f327640a7b8f503da940d80b6464 Mon Sep 17 00:00:00 2001 From: rhayes2 Date: Tue, 25 Sep 2018 00:27:31 -0400 Subject: [PATCH 4/7] Add chmod test with incorrect mode value --- tests/spec/fs.chmod.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/spec/fs.chmod.spec.js b/tests/spec/fs.chmod.spec.js index 0f7f166..1ed4ce5 100644 --- a/tests/spec/fs.chmod.spec.js +++ b/tests/spec/fs.chmod.spec.js @@ -44,7 +44,7 @@ describe('fs.chmod, fs.fchmod', function() { fs.mkdir('/file',function(err) { if(err) throw err; - + fs.chmod('file', 1000, function(err) { expect(err).to.exist; expect(err.code).to.equal('EINVAL'); From 395de63751759aab6161af523ab06f9207c50212 Mon Sep 17 00:00:00 2001 From: rhayes2 Date: Tue, 25 Sep 2018 00:29:33 -0400 Subject: [PATCH 5/7] aDD Chmod --test for chmod --- tests/spec/fs.chmod.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/spec/fs.chmod.spec.js b/tests/spec/fs.chmod.spec.js index 1ed4ce5..0f7f166 100644 --- a/tests/spec/fs.chmod.spec.js +++ b/tests/spec/fs.chmod.spec.js @@ -44,7 +44,7 @@ describe('fs.chmod, fs.fchmod', function() { fs.mkdir('/file',function(err) { if(err) throw err; - + fs.chmod('file', 1000, function(err) { expect(err).to.exist; expect(err.code).to.equal('EINVAL'); From 7a716e033ba6cc6d381f946616e9185ca4e4c78a Mon Sep 17 00:00:00 2001 From: rhayes2 Date: Tue, 25 Sep 2018 00:31:49 -0400 Subject: [PATCH 6/7] Add chmod --test for chmode mode value --- tests/spec/fs.chmod.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/spec/fs.chmod.spec.js b/tests/spec/fs.chmod.spec.js index 0f7f166..f901763 100644 --- a/tests/spec/fs.chmod.spec.js +++ b/tests/spec/fs.chmod.spec.js @@ -42,7 +42,7 @@ describe('fs.chmod, fs.fchmod', function() { it('should be a valid mode value to set permissions', function(done){ var fs = util.fs(); - fs.mkdir('/file',function(err) { + fs.mkdir('/file', function(err) { if(err) throw err; fs.chmod('file', 1000, function(err) { From 31b3c40d74c98981d64ae46e327636689e6736ac Mon Sep 17 00:00:00 2001 From: rhayes2 Date: Tue, 25 Sep 2018 00:35:46 -0400 Subject: [PATCH 7/7] Line ending fix --- .eslintrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index d05146e..84787e1 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -18,7 +18,7 @@ ], "linebreak-style": [ "error", - "windows" + "unix" ], "quotes": [ "error",