Skip to content

Commit

Permalink
Remove process.cwd() trick from test files
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanZim committed Oct 24, 2022
1 parent ccf9026 commit c22d445
Show file tree
Hide file tree
Showing 37 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion lib/copy/__tests__/ncp/broken-symlink.test.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../../..')
const ncp = require('../../copy')
const path = require('path')
const assert = require('assert')
Expand Down
2 changes: 1 addition & 1 deletion lib/copy/__tests__/ncp/ncp-error-perm.test.js
Expand Up @@ -4,7 +4,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../../..')
const ncp = require('../../copy')
const path = require('path')
const assert = require('assert')
Expand Down
2 changes: 1 addition & 1 deletion lib/copy/__tests__/ncp/symlink.test.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../../..')
const ncp = require('../../copy')
const path = require('path')
const assert = require('assert')
Expand Down
2 changes: 1 addition & 1 deletion lib/empty/__tests__/empty-dir-sync.test.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../..')
const path = require('path')
const assert = require('assert')

Expand Down
2 changes: 1 addition & 1 deletion lib/empty/__tests__/empty-dir.test.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../..')
const path = require('path')
const assert = require('assert')

Expand Down
2 changes: 1 addition & 1 deletion lib/ensure/__tests__/create.test.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../..')
const path = require('path')
const assert = require('assert')

Expand Down
2 changes: 1 addition & 1 deletion lib/ensure/__tests__/ensure.test.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../..')
const path = require('path')
const assert = require('assert')

Expand Down
2 changes: 1 addition & 1 deletion lib/ensure/__tests__/link.test.js
Expand Up @@ -4,7 +4,7 @@ const CWD = process.cwd()

const fs = require('graceful-fs')
const os = require('os')
const fse = require(CWD)
const fse = require('../..')
const path = require('path')
const assert = require('assert')
const ensureLink = fse.ensureLink
Expand Down
2 changes: 1 addition & 1 deletion lib/ensure/__tests__/symlink-paths.test.js
Expand Up @@ -4,7 +4,7 @@ const CWD = process.cwd()

const fs = require('graceful-fs')
const os = require('os')
const fse = require(CWD)
const fse = require('../..')
const path = require('path')
const assert = require('assert')
const _symlinkPaths = require('../symlink-paths')
Expand Down
2 changes: 1 addition & 1 deletion lib/ensure/__tests__/symlink-type.test.js
Expand Up @@ -4,7 +4,7 @@ const CWD = process.cwd()

const fs = require('graceful-fs')
const os = require('os')
const fse = require(CWD)
const fse = require('../..')
const path = require('path')
const assert = require('assert')
const _symlinkType = require('../symlink-type')
Expand Down
2 changes: 1 addition & 1 deletion lib/ensure/__tests__/symlink.test.js
Expand Up @@ -4,7 +4,7 @@ const CWD = process.cwd()

const fs = require('graceful-fs')
const os = require('os')
const fse = require(CWD)
const fse = require('../..')
const path = require('path')
const assert = require('assert')
const _symlinkPaths = require('../symlink-paths')
Expand Down
2 changes: 1 addition & 1 deletion lib/fs/__tests__/realpath.test.js
Expand Up @@ -18,7 +18,7 @@ describe('realpath.native does not exist', () => {

const realpathNativeBackup = fs.realpath.native
const clearFseCache = () => {
const fsePath = path.dirname(require.resolve('../../..'))
const fsePath = path.dirname(require.resolve('../..'))
for (const entry in require.cache) {
if (entry.startsWith(fsePath)) {
delete require.cache[entry]
Expand Down
2 changes: 1 addition & 1 deletion lib/json/__tests__/jsonfile-integration.test.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../..')
const path = require('path')
const assert = require('assert')

Expand Down
2 changes: 1 addition & 1 deletion lib/json/__tests__/output-json-sync.test.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../..')
const path = require('path')
const assert = require('assert')

Expand Down
2 changes: 1 addition & 1 deletion lib/json/__tests__/output-json.test.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../..')
const path = require('path')
const assert = require('assert')

Expand Down
2 changes: 1 addition & 1 deletion lib/json/__tests__/promise-support.test.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../..')
const path = require('path')
const assert = require('assert')

Expand Down
2 changes: 1 addition & 1 deletion lib/json/__tests__/read.test.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../..')
const path = require('path')
const assert = require('assert')

Expand Down
2 changes: 1 addition & 1 deletion lib/mkdirs/__tests__/clobber.test.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../..')
const path = require('path')
const assert = require('assert')

Expand Down
2 changes: 1 addition & 1 deletion lib/mkdirs/__tests__/issue-209.test.js
@@ -1,7 +1,7 @@
'use strict'

const assert = require('assert')
const fse = require(process.cwd())
const fse = require('../..')

/* global describe, it */

Expand Down
2 changes: 1 addition & 1 deletion lib/mkdirs/__tests__/issue-93.test.js
@@ -1,7 +1,7 @@
'use strict'

const os = require('os')
const fse = require(process.cwd())
const fse = require('../..')
const path = require('path')
const assert = require('assert')
const util = require('util')
Expand Down
2 changes: 1 addition & 1 deletion lib/mkdirs/__tests__/mkdir.test.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../..')
const path = require('path')
const assert = require('assert')

Expand Down
2 changes: 1 addition & 1 deletion lib/mkdirs/__tests__/mkdirp.test.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../..')
const path = require('path')
const assert = require('assert')

Expand Down
2 changes: 1 addition & 1 deletion lib/mkdirs/__tests__/opts-undef.test.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../..')
const path = require('path')
const assert = require('assert')

Expand Down
2 changes: 1 addition & 1 deletion lib/mkdirs/__tests__/perm_sync.test.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../..')
const path = require('path')
const assert = require('assert')

Expand Down
2 changes: 1 addition & 1 deletion lib/mkdirs/__tests__/race.test.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../..')
const path = require('path')
const assert = require('assert')

Expand Down
2 changes: 1 addition & 1 deletion lib/mkdirs/__tests__/rel.test.js
Expand Up @@ -4,7 +4,7 @@ const CWD = process.cwd()

const fs = require('fs')
const os = require('os')
const fse = require(CWD)
const fse = require('../..')
const path = require('path')
const assert = require('assert')

Expand Down
2 changes: 1 addition & 1 deletion lib/mkdirs/__tests__/sync.test.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../..')
const path = require('path')
const assert = require('assert')

Expand Down
2 changes: 1 addition & 1 deletion lib/move/__tests__/move-sync.test.js
Expand Up @@ -4,7 +4,7 @@
// const fs = require('graceful-fs')
const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../..')
const path = require('path')
const assert = require('assert')

Expand Down
2 changes: 1 addition & 1 deletion lib/output-file/__tests__/output.test.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../..')
const path = require('path')
const assert = require('assert')

Expand Down
2 changes: 1 addition & 1 deletion lib/path-exists/__tests__/path-exists-sync.test.js
@@ -1,7 +1,7 @@
'use strict'
/* eslint-env mocha */

const fs = require(process.cwd())
const fs = require('../..')
const path = require('path')
const os = require('os')
const assert = require('assert')
Expand Down
2 changes: 1 addition & 1 deletion lib/path-exists/__tests__/path-exists.test.js
@@ -1,7 +1,7 @@
'use strict'
/* eslint-env mocha */

const fs = require(process.cwd())
const fs = require('../..')
const path = require('path')
const os = require('os')
const assert = require('assert')
Expand Down
2 changes: 1 addition & 1 deletion lib/remove/__tests__/remove-dir.test.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../..')
const path = require('path')
const assert = require('assert')

Expand Down
2 changes: 1 addition & 1 deletion lib/remove/__tests__/remove-sync-dir.test.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../..')
const path = require('path')
const assert = require('assert')

Expand Down
2 changes: 1 addition & 1 deletion lib/remove/__tests__/remove-sync-file.test.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../..')
const path = require('path')
const assert = require('assert')

Expand Down
2 changes: 1 addition & 1 deletion lib/remove/__tests__/remove.test.js
Expand Up @@ -5,7 +5,7 @@ const fs = require('fs')
const os = require('os')
const path = require('path')
const randomBytes = require('crypto').randomBytes
const fse = require(process.cwd())
const fse = require('../..')

/* global afterEach, beforeEach, describe, it */

Expand Down
2 changes: 1 addition & 1 deletion lib/util/__tests__/stat.test.js
@@ -1,6 +1,6 @@
'use strict'

const fs = require(process.cwd())
const fs = require('../..')
const os = require('os')
const path = require('path')
const assert = require('assert')
Expand Down
2 changes: 1 addition & 1 deletion lib/util/__tests__/utimes.test.js
Expand Up @@ -2,7 +2,7 @@

const fs = require('fs')
const os = require('os')
const fse = require(process.cwd())
const fse = require('../..')
const path = require('path')
const assert = require('assert')
const proxyquire = require('proxyquire')
Expand Down

0 comments on commit c22d445

Please sign in to comment.