Skip to content

Commit 59992a4

Browse files
committed
fix: rm rimraf, use fs.rm
1 parent fc540c2 commit 59992a4

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
"devDependencies": {
3737
"git-pull-or-clone": "^2.0.1",
3838
"npm-run-all": "^4.1.5",
39-
"rimraf": "^3.0.2",
4039
"snazzy": "^9.0.0",
4140
"standard": "^17.0.0",
4241
"tap-arc": "^0.3.4",

test/get-defaults-test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
const test = require('tape')
2+
const fs = require('fs')
23
const path = require('path')
34
const tmp = require('tmp')
45
const gitPullOrClone = require('git-pull-or-clone')
5-
const rimraf = require('rimraf')
6-
76
const getDefaults = require('../bin/lib/get-defaults')
8-
const remote = 'https://github.com/bcomnes/gh-release-test.git'
7+
8+
const GH_RELEASE_TEST_REPO = 'https://github.com/bcomnes/gh-release-test.git'
99

1010
let repoDir, tmpDir
1111

@@ -14,7 +14,7 @@ test('Set up test environment', function (t) {
1414
tmpDir = tmp.dirSync({ unsafeCleanup: true })
1515
repoDir = path.join(tmpDir.name, 'test-repo')
1616
t.ok(tmpDir.name, 'valid tmp dir exists')
17-
gitPullOrClone(remote, repoDir, function (err) {
17+
gitPullOrClone(GH_RELEASE_TEST_REPO, repoDir, function (err) {
1818
t.error(err, 'cloned test repo')
1919
})
2020
})
@@ -73,7 +73,7 @@ test('get-defaults errors out with an invalid repository URL', function (t) {
7373

7474
test('Clean up tests', function (t) {
7575
t.plan(1)
76-
rimraf(tmpDir.name, function (err) {
76+
fs.rm(tmpDir.name, { recursive: true, force: true }, function (err) {
7777
t.error(err, 'repo cleaned up')
7878
})
7979
})

0 commit comments

Comments
 (0)