11const test = require ( 'tape' )
2+ const fs = require ( 'fs' )
23const path = require ( 'path' )
34const tmp = require ( 'tmp' )
45const gitPullOrClone = require ( 'git-pull-or-clone' )
5- const rimraf = require ( 'rimraf' )
6-
76const 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
1010let 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
7474test ( '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