Browse Source
Merge pull request #7 from beaussan/fix/tests
✅ fix tests for git config
pull/8/head
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
12 additions and
6 deletions
-
src/tests/add/prettier.spec.ts
-
src/tests/add/tailwind.spec.ts
-
src/utls/base-add-command.spec.ts
|
|
@ -20,8 +20,10 @@ beforeEach(async () => { |
|
|
execPath = filesystem.path('/', 'tmp', tmpDirName); |
|
|
execPath = filesystem.path('/', 'tmp', tmpDirName); |
|
|
filesystem.dir(execPath); |
|
|
filesystem.dir(execPath); |
|
|
process.chdir(execPath); |
|
|
process.chdir(execPath); |
|
|
|
|
|
try { |
|
|
await system.run('git config --global user.email "you@example.com"'); |
|
|
await system.run('git config --global user.email "you@example.com"'); |
|
|
await system.run('git config --global user.name "Your Name"'); |
|
|
await system.run('git config --global user.name "Your Name"'); |
|
|
|
|
|
} catch {} |
|
|
}); |
|
|
}); |
|
|
afterEach(() => { |
|
|
afterEach(() => { |
|
|
console.log = originalLog; |
|
|
console.log = originalLog; |
|
|
|
|
|
@ -20,8 +20,10 @@ beforeEach(async () => { |
|
|
execPath = filesystem.path('/', 'tmp', tmpDirName); |
|
|
execPath = filesystem.path('/', 'tmp', tmpDirName); |
|
|
filesystem.dir(execPath); |
|
|
filesystem.dir(execPath); |
|
|
process.chdir(execPath); |
|
|
process.chdir(execPath); |
|
|
|
|
|
try { |
|
|
await system.run('git config --global user.email "you@example.com"'); |
|
|
await system.run('git config --global user.email "you@example.com"'); |
|
|
await system.run('git config --global user.name "Your Name"'); |
|
|
await system.run('git config --global user.name "Your Name"'); |
|
|
|
|
|
} catch {} |
|
|
}); |
|
|
}); |
|
|
afterEach(() => { |
|
|
afterEach(() => { |
|
|
console.log = originalLog; |
|
|
console.log = originalLog; |
|
|
|
|
|
@ -18,8 +18,10 @@ beforeEach(async () => { |
|
|
execPath = filesystem.path('/', 'tmp', tmpDirName); |
|
|
execPath = filesystem.path('/', 'tmp', tmpDirName); |
|
|
filesystem.dir(execPath); |
|
|
filesystem.dir(execPath); |
|
|
process.chdir(execPath); |
|
|
process.chdir(execPath); |
|
|
|
|
|
try { |
|
|
await system.run('git config --global user.email "you@example.com"'); |
|
|
await system.run('git config --global user.email "you@example.com"'); |
|
|
await system.run('git config --global user.name "Your Name"'); |
|
|
await system.run('git config --global user.name "Your Name"'); |
|
|
|
|
|
} catch {} |
|
|
}); |
|
|
}); |
|
|
afterEach(() => { |
|
|
afterEach(() => { |
|
|
console.log = originalLog; |
|
|
console.log = originalLog; |
|
|
|