Skip to content

Commit

Permalink
Upgrade 'standard' and run 'standard --fix' (#720)
Browse files Browse the repository at this point in the history
* Upgrade 'standard' and run 'standard --fix'

* Fix with double quotes

If single quotes are included, enclose them in double quotes.
  • Loading branch information
abetomo authored and RyanZim committed Sep 6, 2019
1 parent e3d1ab8 commit d1a01e7
Show file tree
Hide file tree
Showing 10 changed files with 100 additions and 100 deletions.
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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')
Expand Down
Expand Up @@ -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)
})
Expand All @@ -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)
})
Expand Down Expand Up @@ -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')

Expand All @@ -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')

Expand Down
8 changes: 4 additions & 4 deletions lib/copy/__tests__/copy-prevent-copying-identical.test.js
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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')
Expand All @@ -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')
Expand Down
36 changes: 18 additions & 18 deletions lib/copy/__tests__/copy-prevent-copying-into-itself.test.js
Expand Up @@ -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)
})
Expand All @@ -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)
})
Expand Down Expand Up @@ -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')

Expand All @@ -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')

Expand Down
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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')
Expand Down

0 comments on commit d1a01e7

Please sign in to comment.