From d1a01e735e81688e08688557d7a254fa8297d98e Mon Sep 17 00:00:00 2001 From: Tomoaki Abe Date: Sat, 7 Sep 2019 00:23:34 +0900 Subject: [PATCH] Upgrade 'standard' and run 'standard --fix' (#720) * Upgrade 'standard' and run 'standard --fix' * Fix with double quotes If single quotes are included, enclose them in double quotes. --- ...opy-sync-prevent-copying-identical.test.js | 8 ++-- ...y-sync-prevent-copying-into-itself.test.js | 36 +++++++-------- .../copy-prevent-copying-identical.test.js | 8 ++-- .../copy-prevent-copying-into-itself.test.js | 36 +++++++-------- ...move-sync-prevent-moving-identical.test.js | 8 ++-- ...ve-sync-prevent-moving-into-itself.test.js | 46 +++++++++---------- lib/move-sync/__tests__/move-sync.test.js | 2 +- .../move-prevent-moving-identical.test.js | 8 ++-- .../move-prevent-moving-into-itself.test.js | 46 +++++++++---------- package.json | 2 +- 10 files changed, 100 insertions(+), 100 deletions(-) diff --git a/lib/copy-sync/__tests__/copy-sync-prevent-copying-identical.test.js b/lib/copy-sync/__tests__/copy-sync-prevent-copying-identical.test.js index c1f3091d..87135a96 100644 --- a/lib/copy-sync/__tests__/copy-sync-prevent-copying-identical.test.js +++ b/lib/copy-sync/__tests__/copy-sync-prevent-copying-identical.test.js @@ -112,7 +112,7 @@ describe('+ copySync() - prevent copying identical files and dirs', () => { // src is symlink, dest is symlink describe('> when src is a directory', () => { - describe(`>> when src is regular and dest is a symlink that points to src`, () => { + describe('>> when src is regular and dest is a symlink that points to src', () => { it('should error', () => { src = path.join(TEST_DIR, 'src') fs.mkdirsSync(src) @@ -138,7 +138,7 @@ describe('+ copySync() - prevent copying identical files and dirs', () => { }) }) - describe(`>> when src is a symlink that points to a regular dest`, () => { + describe('>> when src is a symlink that points to a regular dest', () => { it('should throw error', () => { dest = path.join(TEST_DIR, 'dest') fs.mkdirsSync(dest) @@ -202,7 +202,7 @@ describe('+ copySync() - prevent copying identical files and dirs', () => { // src is symlink, dest is symlink describe('> when src is a file', () => { - describe(`>> when src is regular and dest is a symlink that points to src`, () => { + describe('>> when src is regular and dest is a symlink that points to src', () => { it('should error', () => { src = path.join(TEST_DIR, 'src', 'somefile.txt') fs.ensureFileSync(src) @@ -223,7 +223,7 @@ describe('+ copySync() - prevent copying identical files and dirs', () => { }) }) - describe(`>> when src is a symlink that points to a regular dest`, () => { + describe('>> when src is a symlink that points to a regular dest', () => { it('should throw error', () => { dest = path.join(TEST_DIR, 'dest', 'somefile.txt') fs.outputFileSync(dest, 'some data') diff --git a/lib/copy-sync/__tests__/copy-sync-prevent-copying-into-itself.test.js b/lib/copy-sync/__tests__/copy-sync-prevent-copying-into-itself.test.js index 51f864ac..f9418cb1 100644 --- a/lib/copy-sync/__tests__/copy-sync-prevent-copying-into-itself.test.js +++ b/lib/copy-sync/__tests__/copy-sync-prevent-copying-into-itself.test.js @@ -60,59 +60,59 @@ describe('+ copySync() - prevent copying into itself', () => { describe('> when source is a directory', () => { describe('>> when dest is a directory', () => { - it(`of not itself`, () => { + it('of not itself', () => { const dest = path.join(TEST_DIR, src.replace(/^\w:/, '')) return testSuccess(src, dest) }) - it(`of itself`, () => { + it('of itself', () => { const dest = path.join(src, 'dest') return testError(src, dest) }) - it(`should copy the directory successfully when dest is 'src_dest'`, () => { + it("should copy the directory successfully when dest is 'src_dest'", () => { const dest = path.join(TEST_DIR, 'src_dest') return testSuccess(src, dest) }) - it(`should copy the directory successfully when dest is 'src-dest'`, () => { + it("should copy the directory successfully when dest is 'src-dest'", () => { const dest = path.join(TEST_DIR, 'src-dest') return testSuccess(src, dest) }) - it(`should copy the directory successfully when dest is 'dest_src'`, () => { + it("should copy the directory successfully when dest is 'dest_src'", () => { const dest = path.join(TEST_DIR, 'dest_src') return testSuccess(src, dest) }) - it(`should copy the directory successfully when dest is 'src_dest/src'`, () => { + it("should copy the directory successfully when dest is 'src_dest/src'", () => { const dest = path.join(TEST_DIR, 'src_dest', 'src') return testSuccess(src, dest) }) - it(`should copy the directory successfully when dest is 'src-dest/src'`, () => { + it("should copy the directory successfully when dest is 'src-dest/src'", () => { const dest = path.join(TEST_DIR, 'src-dest', 'src') return testSuccess(src, dest) }) - it(`should copy the directory successfully when dest is 'dest_src/src'`, () => { + it("should copy the directory successfully when dest is 'dest_src/src'", () => { const dest = path.join(TEST_DIR, 'dest_src', 'src') return testSuccess(src, dest) }) - it(`should copy the directory successfully when dest is 'src_src/dest'`, () => { + it("should copy the directory successfully when dest is 'src_src/dest'", () => { const dest = path.join(TEST_DIR, 'src_src', 'dest') return testSuccess(src, dest) }) - it(`should copy the directory successfully when dest is 'src-src/dest'`, () => { + it("should copy the directory successfully when dest is 'src-src/dest'", () => { const dest = path.join(TEST_DIR, 'src-src', 'dest') return testSuccess(src, dest) }) - it(`should copy the directory successfully when dest is 'srcsrc/dest'`, () => { + it("should copy the directory successfully when dest is 'srcsrc/dest'", () => { const dest = path.join(TEST_DIR, 'srcsrc', 'dest') return testSuccess(src, dest) }) - it(`should copy the directory successfully when dest is 'dest/src'`, () => { + it("should copy the directory successfully when dest is 'dest/src'", () => { const dest = path.join(TEST_DIR, 'dest', 'src') return testSuccess(src, dest) }) @@ -124,22 +124,22 @@ describe('+ copySync() - prevent copying into itself', () => { return testSuccess(src, dest) }) - it(`should error when dest is 'src/dest'`, () => { + it("should error when dest is 'src/dest'", () => { const dest = path.join(TEST_DIR, 'src', 'dest') return testError(src, dest) }) - it(`should error when dest is 'src/src_dest'`, () => { + it("should error when dest is 'src/src_dest'", () => { const dest = path.join(TEST_DIR, 'src', 'src_dest') return testError(src, dest) }) - it(`should error when dest is 'src/dest_src'`, () => { + it("should error when dest is 'src/dest_src'", () => { const dest = path.join(TEST_DIR, 'src', 'dest_src') return testError(src, dest) }) - it(`should error when dest is 'src/dest/src'`, () => { + it("should error when dest is 'src/dest/src'", () => { const dest = path.join(TEST_DIR, 'src', 'dest', 'src') return testError(src, dest) }) @@ -301,7 +301,7 @@ describe('+ copySync() - prevent copying into itself', () => { } }) - it(`should copy the directory successfully when dest is 'src_src/dest'`, () => { + it("should copy the directory successfully when dest is 'src_src/dest'", () => { const srcLink = path.join(TEST_DIR, 'src-symlink') fs.symlinkSync(src, srcLink, 'dir') @@ -311,7 +311,7 @@ describe('+ copySync() - prevent copying into itself', () => { assert.strictEqual(link, src) }) - it(`should copy the directory successfully when dest is 'srcsrc/dest'`, () => { + it("should copy the directory successfully when dest is 'srcsrc/dest'", () => { const srcLink = path.join(TEST_DIR, 'src-symlink') fs.symlinkSync(src, srcLink, 'dir') diff --git a/lib/copy/__tests__/copy-prevent-copying-identical.test.js b/lib/copy/__tests__/copy-prevent-copying-identical.test.js index d30ec91b..b79674ae 100644 --- a/lib/copy/__tests__/copy-prevent-copying-identical.test.js +++ b/lib/copy/__tests__/copy-prevent-copying-identical.test.js @@ -103,7 +103,7 @@ describe('+ copy() - prevent copying identical files and dirs', () => { // src is symlink, dest is symlink describe('> when src is a directory', () => { - describe(`>> when src is regular and dest is a symlink that points to src`, () => { + describe('>> when src is regular and dest is a symlink that points to src', () => { it('should error', done => { src = path.join(TEST_DIR, 'src') fs.mkdirsSync(src) @@ -128,7 +128,7 @@ describe('+ copy() - prevent copying identical files and dirs', () => { }) }) - describe(`>> when src is a symlink that points to a regular dest`, () => { + describe('>> when src is a symlink that points to a regular dest', () => { it('should throw error', done => { dest = path.join(TEST_DIR, 'dest') fs.mkdirsSync(dest) @@ -190,7 +190,7 @@ describe('+ copy() - prevent copying identical files and dirs', () => { // src is symlink, dest is symlink describe('> when src is a file', () => { - describe(`>> when src is regular and dest is a symlink that points to src`, () => { + describe('>> when src is regular and dest is a symlink that points to src', () => { it('should error', done => { src = path.join(TEST_DIR, 'src.txt') fs.outputFileSync(src, 'some data') @@ -205,7 +205,7 @@ describe('+ copy() - prevent copying identical files and dirs', () => { }) }) - describe(`>> when src is a symlink that points to a regular dest`, () => { + describe('>> when src is a symlink that points to a regular dest', () => { it('should throw error', done => { dest = path.join(TEST_DIR, 'dest', 'somefile.txt') fs.outputFileSync(dest, 'some data') diff --git a/lib/copy/__tests__/copy-prevent-copying-into-itself.test.js b/lib/copy/__tests__/copy-prevent-copying-into-itself.test.js index 552cbded..7c629234 100644 --- a/lib/copy/__tests__/copy-prevent-copying-into-itself.test.js +++ b/lib/copy/__tests__/copy-prevent-copying-into-itself.test.js @@ -63,59 +63,59 @@ describe('+ copy() - prevent copying into itself', () => { describe('> when source is a directory', () => { describe('>> when dest is a directory', () => { - it(`of not itself`, done => { + it('of not itself', done => { const dest = path.join(TEST_DIR, src.replace(/^\w:/, '')) return testSuccess(src, dest, done) }) - it(`of itself`, done => { + it('of itself', done => { const dest = path.join(src, 'dest') return testError(src, dest, done) }) - it(`should copy the directory successfully when dest is 'src_dest'`, done => { + it("should copy the directory successfully when dest is 'src_dest'", done => { const dest = path.join(TEST_DIR, 'src_dest') return testSuccess(src, dest, done) }) - it(`should copy the directory successfully when dest is 'src-dest'`, done => { + it("should copy the directory successfully when dest is 'src-dest'", done => { const dest = path.join(TEST_DIR, 'src-dest') return testSuccess(src, dest, done) }) - it(`should copy the directory successfully when dest is 'dest_src'`, done => { + it("should copy the directory successfully when dest is 'dest_src'", done => { const dest = path.join(TEST_DIR, 'dest_src') return testSuccess(src, dest, done) }) - it(`should copy the directory successfully when dest is 'src_dest/src'`, done => { + it("should copy the directory successfully when dest is 'src_dest/src'", done => { const dest = path.join(TEST_DIR, 'src_dest', 'src') return testSuccess(src, dest, done) }) - it(`should copy the directory successfully when dest is 'src-dest/src'`, done => { + it("should copy the directory successfully when dest is 'src-dest/src'", done => { const dest = path.join(TEST_DIR, 'src-dest', 'src') return testSuccess(src, dest, done) }) - it(`should copy the directory successfully when dest is 'dest_src/src'`, done => { + it("should copy the directory successfully when dest is 'dest_src/src'", done => { const dest = path.join(TEST_DIR, 'dest_src', 'src') return testSuccess(src, dest, done) }) - it(`should copy the directory successfully when dest is 'src_src/dest'`, done => { + it("should copy the directory successfully when dest is 'src_src/dest'", done => { const dest = path.join(TEST_DIR, 'src_src', 'dest') return testSuccess(src, dest, done) }) - it(`should copy the directory successfully when dest is 'src-src/dest'`, done => { + it("should copy the directory successfully when dest is 'src-src/dest'", done => { const dest = path.join(TEST_DIR, 'src-src', 'dest') return testSuccess(src, dest, done) }) - it(`should copy the directory successfully when dest is 'srcsrc/dest'`, done => { + it("should copy the directory successfully when dest is 'srcsrc/dest'", done => { const dest = path.join(TEST_DIR, 'srcsrc', 'dest') return testSuccess(src, dest, done) }) - it(`should copy the directory successfully when dest is 'dest/src'`, done => { + it("should copy the directory successfully when dest is 'dest/src'", done => { const dest = path.join(TEST_DIR, 'dest', 'src') return testSuccess(src, dest, done) }) @@ -127,22 +127,22 @@ describe('+ copy() - prevent copying into itself', () => { return testSuccess(src, dest, done) }) - it(`should error when dest is 'src/dest'`, done => { + it("should error when dest is 'src/dest'", done => { const dest = path.join(TEST_DIR, 'src', 'dest') return testError(src, dest, done) }) - it(`should error when dest is 'src/src_dest'`, done => { + it("should error when dest is 'src/src_dest'", done => { const dest = path.join(TEST_DIR, 'src', 'src_dest') return testError(src, dest, done) }) - it(`should error when dest is 'src/dest_src'`, done => { + it("should error when dest is 'src/dest_src'", done => { const dest = path.join(TEST_DIR, 'src', 'dest_src') return testError(src, dest, done) }) - it(`should error when dest is 'src/dest/src'`, done => { + it("should error when dest is 'src/dest/src'", done => { const dest = path.join(TEST_DIR, 'src', 'dest', 'src') return testError(src, dest, done) }) @@ -295,7 +295,7 @@ describe('+ copy() - prevent copying into itself', () => { }) }) - it(`should copy the directory successfully when dest is 'src_src/dest'`, done => { + it("should copy the directory successfully when dest is 'src_src/dest'", done => { const srcLink = path.join(TEST_DIR, 'src-symlink') fs.symlinkSync(src, srcLink, 'dir') @@ -307,7 +307,7 @@ describe('+ copy() - prevent copying into itself', () => { }) }) - it(`should copy the directory successfully when dest is 'srcsrc/dest'`, done => { + it("should copy the directory successfully when dest is 'srcsrc/dest'", done => { const srcLink = path.join(TEST_DIR, 'src-symlink') fs.symlinkSync(src, srcLink, 'dir') diff --git a/lib/move-sync/__tests__/move-sync-prevent-moving-identical.test.js b/lib/move-sync/__tests__/move-sync-prevent-moving-identical.test.js index 238cb2a3..aed8acdd 100644 --- a/lib/move-sync/__tests__/move-sync-prevent-moving-identical.test.js +++ b/lib/move-sync/__tests__/move-sync-prevent-moving-identical.test.js @@ -112,7 +112,7 @@ describe('+ moveSync() - prevent moving identical files and dirs', () => { // src is symlink, dest is symlink describe('> when src is a directory', () => { - describe(`>> when src is regular and dest is a symlink that points to src`, () => { + describe('>> when src is regular and dest is a symlink that points to src', () => { it('should error', () => { src = path.join(TEST_DIR, 'src') fs.mkdirsSync(src) @@ -138,7 +138,7 @@ describe('+ moveSync() - prevent moving identical files and dirs', () => { }) }) - describe(`>> when src is a symlink that points to a regular dest`, () => { + describe('>> when src is a symlink that points to a regular dest', () => { it('should throw error', () => { dest = path.join(TEST_DIR, 'dest') fs.mkdirsSync(dest) @@ -202,7 +202,7 @@ describe('+ moveSync() - prevent moving identical files and dirs', () => { // src is symlink, dest is symlink describe('> when src is a file', () => { - describe(`>> when src is regular and dest is a symlink that points to src`, () => { + describe('>> when src is regular and dest is a symlink that points to src', () => { it('should error', () => { src = path.join(TEST_DIR, 'src', 'somefile.txt') fs.ensureFileSync(src) @@ -223,7 +223,7 @@ describe('+ moveSync() - prevent moving identical files and dirs', () => { }) }) - describe(`>> when src is a symlink that points to a regular dest`, () => { + describe('>> when src is a symlink that points to a regular dest', () => { it('should throw error', () => { dest = path.join(TEST_DIR, 'dest', 'somefile.txt') fs.outputFileSync(dest, 'some data') diff --git a/lib/move-sync/__tests__/move-sync-prevent-moving-into-itself.test.js b/lib/move-sync/__tests__/move-sync-prevent-moving-into-itself.test.js index 2cdfadfd..dc2c7597 100644 --- a/lib/move-sync/__tests__/move-sync-prevent-moving-into-itself.test.js +++ b/lib/move-sync/__tests__/move-sync-prevent-moving-into-itself.test.js @@ -53,27 +53,27 @@ describe('+ moveSync() - prevent moving into itself', () => { }) describe('> when source is a file', () => { - it(`should move the file successfully even when dest parent is 'src/dest'`, () => { + it("should move the file successfully even when dest parent is 'src/dest'", () => { const destFile = path.join(TEST_DIR, 'src', 'dest', 'destfile.txt') return testSuccessFile(src, destFile) }) - it(`should move the file successfully when dest parent is 'src/src_dest'`, () => { + it("should move the file successfully when dest parent is 'src/src_dest'", () => { const destFile = path.join(TEST_DIR, 'src', 'src_dest', 'destfile.txt') return testSuccessFile(src, destFile) }) - it(`should move the file successfully when dest parent is 'src/dest_src'`, () => { + it("should move the file successfully when dest parent is 'src/dest_src'", () => { const destFile = path.join(TEST_DIR, 'src', 'dest_src', 'destfile.txt') return testSuccessFile(src, destFile) }) - it(`should move the file successfully when dest parent is 'src/dest/src'`, () => { + it("should move the file successfully when dest parent is 'src/dest/src'", () => { const destFile = path.join(TEST_DIR, 'src', 'dest', 'src', 'destfile.txt') return testSuccessFile(src, destFile) }) - it(`should move the file successfully when dest parent is 'srcsrc/dest'`, () => { + it("should move the file successfully when dest parent is 'srcsrc/dest'", () => { const destFile = path.join(TEST_DIR, 'srcsrc', 'dest', 'destfile.txt') return testSuccessFile(src, destFile) }) @@ -81,59 +81,59 @@ describe('+ moveSync() - prevent moving into itself', () => { describe('> when source is a directory', () => { describe('>> when dest is a directory', () => { - it(`of not itself`, () => { + it('of not itself', () => { const dest = path.join(TEST_DIR, src.replace(/^\w:/, '')) return testSuccessDir(src, dest) }) - it(`of itself`, () => { + it('of itself', () => { const dest = path.join(src, 'dest') return testError(src, dest) }) - it(`should move the directory successfully when dest is 'src_dest'`, () => { + it("should move the directory successfully when dest is 'src_dest'", () => { const dest = path.join(TEST_DIR, 'src_dest') return testSuccessDir(src, dest) }) - it(`should move the directory successfully when dest is 'src-dest'`, () => { + it("should move the directory successfully when dest is 'src-dest'", () => { const dest = path.join(TEST_DIR, 'src-dest') return testSuccessDir(src, dest) }) - it(`should move the directory successfully when dest is 'dest_src'`, () => { + it("should move the directory successfully when dest is 'dest_src'", () => { const dest = path.join(TEST_DIR, 'dest_src') return testSuccessDir(src, dest) }) - it(`should move the directory successfully when dest is 'src_dest/src'`, () => { + it("should move the directory successfully when dest is 'src_dest/src'", () => { const dest = path.join(TEST_DIR, 'src_dest', 'src') return testSuccessDir(src, dest) }) - it(`should move the directory successfully when dest is 'src-dest/src'`, () => { + it("should move the directory successfully when dest is 'src-dest/src'", () => { const dest = path.join(TEST_DIR, 'src-dest', 'src') return testSuccessDir(src, dest) }) - it(`should move the directory successfully when dest is 'dest_src/src'`, () => { + it("should move the directory successfully when dest is 'dest_src/src'", () => { const dest = path.join(TEST_DIR, 'dest_src', 'src') return testSuccessDir(src, dest) }) - it(`should move the directory successfully when dest is 'src_src/dest'`, () => { + it("should move the directory successfully when dest is 'src_src/dest'", () => { const dest = path.join(TEST_DIR, 'src_src', 'dest') return testSuccessDir(src, dest) }) - it(`should move the directory successfully when dest is 'src-src/dest'`, () => { + it("should move the directory successfully when dest is 'src-src/dest'", () => { const dest = path.join(TEST_DIR, 'src-src', 'dest') return testSuccessDir(src, dest) }) - it(`should move the directory successfully when dest is 'srcsrc/dest'`, () => { + it("should move the directory successfully when dest is 'srcsrc/dest'", () => { const dest = path.join(TEST_DIR, 'srcsrc', 'dest') return testSuccessDir(src, dest) }) - it(`should move the directory successfully when dest is 'dest/src'`, () => { + it("should move the directory successfully when dest is 'dest/src'", () => { const dest = path.join(TEST_DIR, 'dest', 'src') return testSuccessDir(src, dest) }) @@ -145,22 +145,22 @@ describe('+ moveSync() - prevent moving into itself', () => { return testSuccessDir(src, dest) }) - it(`should error when dest is 'src/dest'`, () => { + it("should error when dest is 'src/dest'", () => { const dest = path.join(TEST_DIR, 'src', 'dest') return testError(src, dest) }) - it(`should error when dest is 'src/src_dest'`, () => { + it("should error when dest is 'src/src_dest'", () => { const dest = path.join(TEST_DIR, 'src', 'src_dest') return testError(src, dest) }) - it(`should error when dest is 'src/dest_src'`, () => { + it("should error when dest is 'src/dest_src'", () => { const dest = path.join(TEST_DIR, 'src', 'dest_src') return testError(src, dest) }) - it(`should error when dest is 'src/dest/src'`, () => { + it("should error when dest is 'src/dest/src'", () => { const dest = path.join(TEST_DIR, 'src', 'dest', 'src') return testError(src, dest) }) @@ -299,7 +299,7 @@ describe('+ moveSync() - prevent moving into itself', () => { } }) - it(`should move the directory successfully when dest is 'src_src/dest'`, () => { + it("should move the directory successfully when dest is 'src_src/dest'", () => { const srcLink = path.join(TEST_DIR, 'src-symlink') fs.symlinkSync(src, srcLink, 'dir') @@ -309,7 +309,7 @@ describe('+ moveSync() - prevent moving into itself', () => { assert.strictEqual(link, src) }) - it(`should move the directory successfully when dest is 'srcsrc/dest'`, () => { + it("should move the directory successfully when dest is 'srcsrc/dest'", () => { const srcLink = path.join(TEST_DIR, 'src-symlink') fs.symlinkSync(src, srcLink, 'dir') diff --git a/lib/move-sync/__tests__/move-sync.test.js b/lib/move-sync/__tests__/move-sync.test.js index 13f50322..8ba0ede3 100644 --- a/lib/move-sync/__tests__/move-sync.test.js +++ b/lib/move-sync/__tests__/move-sync.test.js @@ -282,7 +282,7 @@ describe('moveSync()', () => { try { fs.writeFileSync(path.join(differentDevice, 'file'), 'hi') } catch (err) { - console.log(`Can't write to device. Skipping moveSync test.`) + console.log("Can't write to device. Skipping moveSync test.") __skipTests = true } diff --git a/lib/move/__tests__/move-prevent-moving-identical.test.js b/lib/move/__tests__/move-prevent-moving-identical.test.js index 096a9d45..840ab004 100644 --- a/lib/move/__tests__/move-prevent-moving-identical.test.js +++ b/lib/move/__tests__/move-prevent-moving-identical.test.js @@ -103,7 +103,7 @@ describe('+ move() - prevent moving identical files and dirs', () => { // src is symlink, dest is symlink describe('> when src is a directory', () => { - describe(`>> when src is regular and dest is a symlink that points to src`, () => { + describe('>> when src is regular and dest is a symlink that points to src', () => { it('should error', done => { src = path.join(TEST_DIR, 'src') fs.mkdirsSync(src) @@ -128,7 +128,7 @@ describe('+ move() - prevent moving identical files and dirs', () => { }) }) - describe(`>> when src is a symlink that points to a regular dest`, () => { + describe('>> when src is a symlink that points to a regular dest', () => { it('should throw error', done => { dest = path.join(TEST_DIR, 'dest') fs.mkdirsSync(dest) @@ -190,7 +190,7 @@ describe('+ move() - prevent moving identical files and dirs', () => { // src is symlink, dest is symlink describe('> when src is a file', () => { - describe(`>> when src is regular and dest is a symlink that points to src`, () => { + describe('>> when src is regular and dest is a symlink that points to src', () => { it('should error', done => { src = path.join(TEST_DIR, 'src.txt') fs.outputFileSync(src, 'some data') @@ -205,7 +205,7 @@ describe('+ move() - prevent moving identical files and dirs', () => { }) }) - describe(`>> when src is a symlink that points to a regular dest`, () => { + describe('>> when src is a symlink that points to a regular dest', () => { it('should throw error', done => { dest = path.join(TEST_DIR, 'dest', 'somefile.txt') fs.outputFileSync(dest, 'some data') diff --git a/lib/move/__tests__/move-prevent-moving-into-itself.test.js b/lib/move/__tests__/move-prevent-moving-into-itself.test.js index fe13d095..d24aed66 100644 --- a/lib/move/__tests__/move-prevent-moving-into-itself.test.js +++ b/lib/move/__tests__/move-prevent-moving-into-itself.test.js @@ -55,27 +55,27 @@ describe('+ move() - prevent moving into itself', () => { }) describe('> when source is a file', () => { - it(`should move the file successfully even when dest parent is 'src/dest'`, done => { + it("should move the file successfully even when dest parent is 'src/dest'", done => { const destFile = path.join(TEST_DIR, 'src', 'dest', 'destfile.txt') return testSuccessFile(src, destFile, done) }) - it(`should move the file successfully when dest parent is 'src/src_dest'`, done => { + it("should move the file successfully when dest parent is 'src/src_dest'", done => { const destFile = path.join(TEST_DIR, 'src', 'src_dest', 'destfile.txt') return testSuccessFile(src, destFile, done) }) - it(`should move the file successfully when dest parent is 'src/dest_src'`, done => { + it("should move the file successfully when dest parent is 'src/dest_src'", done => { const destFile = path.join(TEST_DIR, 'src', 'dest_src', 'destfile.txt') return testSuccessFile(src, destFile, done) }) - it(`should move the file successfully when dest parent is 'src/dest/src'`, done => { + it("should move the file successfully when dest parent is 'src/dest/src'", done => { const destFile = path.join(TEST_DIR, 'src', 'dest', 'src', 'destfile.txt') return testSuccessFile(src, destFile, done) }) - it(`should move the file successfully when dest parent is 'srcsrc/dest'`, done => { + it("should move the file successfully when dest parent is 'srcsrc/dest'", done => { const destFile = path.join(TEST_DIR, 'srcsrc', 'dest', 'destfile.txt') return testSuccessFile(src, destFile, done) }) @@ -83,59 +83,59 @@ describe('+ move() - prevent moving into itself', () => { describe('> when source is a directory', () => { describe('>> when dest is a directory', () => { - it(`of not itself`, done => { + it('of not itself', done => { const dest = path.join(TEST_DIR, src.replace(/^\w:/, '')) return testSuccessDir(src, dest, done) }) - it(`of itself`, done => { + it('of itself', done => { const dest = path.join(src, 'dest') return testError(src, dest, done) }) - it(`should move the directory successfully when dest is 'src_dest'`, done => { + it("should move the directory successfully when dest is 'src_dest'", done => { const dest = path.join(TEST_DIR, 'src_dest') return testSuccessDir(src, dest, done) }) - it(`should move the directory successfully when dest is 'src-dest'`, done => { + it("should move the directory successfully when dest is 'src-dest'", done => { const dest = path.join(TEST_DIR, 'src-dest') return testSuccessDir(src, dest, done) }) - it(`should move the directory successfully when dest is 'dest_src'`, done => { + it("should move the directory successfully when dest is 'dest_src'", done => { const dest = path.join(TEST_DIR, 'dest_src') return testSuccessDir(src, dest, done) }) - it(`should move the directory successfully when dest is 'src_dest/src'`, done => { + it("should move the directory successfully when dest is 'src_dest/src'", done => { const dest = path.join(TEST_DIR, 'src_dest', 'src') return testSuccessDir(src, dest, done) }) - it(`should move the directory successfully when dest is 'src-dest/src'`, done => { + it("should move the directory successfully when dest is 'src-dest/src'", done => { const dest = path.join(TEST_DIR, 'src-dest', 'src') return testSuccessDir(src, dest, done) }) - it(`should move the directory successfully when dest is 'dest_src/src'`, done => { + it("should move the directory successfully when dest is 'dest_src/src'", done => { const dest = path.join(TEST_DIR, 'dest_src', 'src') return testSuccessDir(src, dest, done) }) - it(`should move the directory successfully when dest is 'src_src/dest'`, done => { + it("should move the directory successfully when dest is 'src_src/dest'", done => { const dest = path.join(TEST_DIR, 'src_src', 'dest') return testSuccessDir(src, dest, done) }) - it(`should move the directory successfully when dest is 'src-src/dest'`, done => { + it("should move the directory successfully when dest is 'src-src/dest'", done => { const dest = path.join(TEST_DIR, 'src-src', 'dest') return testSuccessDir(src, dest, done) }) - it(`should move the directory successfully when dest is 'srcsrc/dest'`, done => { + it("should move the directory successfully when dest is 'srcsrc/dest'", done => { const dest = path.join(TEST_DIR, 'srcsrc', 'dest') return testSuccessDir(src, dest, done) }) - it(`should move the directory successfully when dest is 'dest/src'`, done => { + it("should move the directory successfully when dest is 'dest/src'", done => { const dest = path.join(TEST_DIR, 'dest', 'src') return testSuccessDir(src, dest, done) }) @@ -147,22 +147,22 @@ describe('+ move() - prevent moving into itself', () => { return testSuccessDir(src, dest, done) }) - it(`should error when dest is 'src/dest'`, done => { + it("should error when dest is 'src/dest'", done => { const dest = path.join(TEST_DIR, 'src', 'dest') return testError(src, dest, done) }) - it(`should error when dest is 'src/src_dest'`, done => { + it("should error when dest is 'src/src_dest'", done => { const dest = path.join(TEST_DIR, 'src', 'src_dest') return testError(src, dest, done) }) - it(`should error when dest is 'src/dest_src'`, done => { + it("should error when dest is 'src/dest_src'", done => { const dest = path.join(TEST_DIR, 'src', 'dest_src') return testError(src, dest, done) }) - it(`should error when dest is 'src/dest/src'`, done => { + it("should error when dest is 'src/dest/src'", done => { const dest = path.join(TEST_DIR, 'src', 'dest', 'src') return testError(src, dest, done) }) @@ -280,7 +280,7 @@ describe('+ move() - prevent moving into itself', () => { }) }) - it(`should move the directory successfully when dest is 'src_src/dest'`, done => { + it("should move the directory successfully when dest is 'src_src/dest'", done => { const srcLink = path.join(TEST_DIR, 'src-symlink') fs.symlinkSync(src, srcLink, 'dir') @@ -292,7 +292,7 @@ describe('+ move() - prevent moving into itself', () => { }) }) - it(`should move the directory successfully when dest is 'srcsrc/dest'`, done => { + it("should move the directory successfully when dest is 'srcsrc/dest'", done => { const srcLink = path.join(TEST_DIR, 'src-symlink') fs.symlinkSync(src, srcLink, 'dir') diff --git a/package.json b/package.json index 37767e75..ec3b26ee 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "proxyquire": "^2.0.1", "read-dir-files": "^0.1.1", "semver": "^5.3.0", - "standard": "^13.0.0" + "standard": "^14.1.0" }, "main": "./lib/index.js", "files": [