Skip to content

Commit 0dfd1cd

Browse files
authored
chore: remove git config from tests (#456)
These were ending up in the project config, not the test fixture
1 parent bfe6f23 commit 0dfd1cd

1 file changed

Lines changed: 0 additions & 35 deletions

File tree

test/git.js

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,6 @@ t.test('setup', { bail: true, skip: isWindows && 'posix only' }, t => {
108108

109109
return mkdir(repo, { recursive: true })
110110
.then(() => git('init'))
111-
.then(() => git('config', 'user.name', 'pacotedev'))
112-
.then(() => git('config', 'user.email', 'i+pacotedev@izs.me'))
113-
.then(() => git('config', 'tag.gpgSign', 'false'))
114-
.then(() => git('config', 'commit.gpgSign', 'false'))
115-
.then(() => git('config', 'tag.forceSignAnnotated', 'false'))
116111
.then(() => write('package.json', JSON.stringify({
117112
name: 'repo',
118113
version: '0.0.0',
@@ -189,11 +184,6 @@ t.test('setup', { bail: true, skip: isWindows && 'posix only' }, t => {
189184

190185
await mkdir(repoDir, { recursive: true })
191186
await git('init')
192-
await git('config', 'user.name', 'pacotedev')
193-
await git('config', 'user.email', 'i+pacotedev@izs.me')
194-
await git('config', 'tag.gpgSign', 'false')
195-
await git('config', 'commit.gpgSign', 'false')
196-
await git('config', 'tag.forceSignAnnotated', 'false')
197187
await write('package.json', JSON.stringify({
198188
name,
199189
version: '0.0.0',
@@ -244,11 +234,6 @@ t.test('setup', { bail: true, skip: isWindows && 'posix only' }, t => {
244234
const write = (f, c) => fs.writeFileSync(`${submoduleRepo}/${f}`, c)
245235
return mkdir(submoduleRepo, { recursive: true })
246236
.then(() => git('init'))
247-
.then(() => git('config', 'user.name', 'pacotedev'))
248-
.then(() => git('config', 'user.email', 'i+pacotedev@izs.me'))
249-
.then(() => git('config', 'tag.gpgSign', 'false'))
250-
.then(() => git('config', 'commit.gpgSign', 'false'))
251-
.then(() => git('config', 'tag.forceSignAnnotated', 'false'))
252237
.then(() => write('package.json', JSON.stringify({
253238
name: 'submod-repo',
254239
version: '1.2.3',
@@ -303,11 +288,6 @@ t.test('setup', { bail: true, skip: isWindows && 'posix only' }, t => {
303288
const write = (f, c) => fs.writeFileSync(`${workspacesRepo}/${f}`, c)
304289
return mkdir(wsfolder, { recursive: true })
305290
.then(() => git('init'))
306-
.then(() => git('config', 'user.name', 'pacotedev'))
307-
.then(() => git('config', 'user.email', 'i+pacotedev@github.com'))
308-
.then(() => git('config', 'tag.gpgSign', 'false'))
309-
.then(() => git('config', 'commit.gpgSign', 'false'))
310-
.then(() => git('config', 'tag.forceSignAnnotated', 'false'))
311291
.then(() => write('package.json', JSON.stringify({
312292
name: 'workspaces-root',
313293
version: '1.2.3',
@@ -332,11 +312,6 @@ t.test('setup', { bail: true, skip: isWindows && 'posix only' }, t => {
332312
const write = (f, c) => fs.writeFileSync(`${prepackRepo}/${f}`, c)
333313
return mkdir(prepackRepo, { recursive: true })
334314
.then(() => git('init'))
335-
.then(() => git('config', 'user.name', 'pacotedev'))
336-
.then(() => git('config', 'user.email', 'i+pacotedev@github.com'))
337-
.then(() => git('config', 'tag.gpgSign', 'false'))
338-
.then(() => git('config', 'commit.gpgSign', 'false'))
339-
.then(() => git('config', 'tag.forceSignAnnotated', 'false'))
340315
.then(() => write('package.json', JSON.stringify({
341316
name: 'prepack-root',
342317
version: '1.0.0',
@@ -462,11 +437,6 @@ t.test('detects changes in the resolved sha', {}, async (t) => {
462437
const write = (f, c) => fs.writeFileSync(f, c)
463438

464439
await mkdir(broken, { recursive: true })
465-
.then(() => git('config', 'user.name', 'pacotedev'))
466-
.then(() => git('config', 'user.email', 'i+pacotedev@izs.me'))
467-
.then(() => git('config', 'tag.gpgSign', 'false'))
468-
.then(() => git('config', 'commit.gpgSign', 'false'))
469-
.then(() => git('config', 'tag.forceSignAnnotated', 'false'))
470440
.then(() => git('init'))
471441
.then(() => write(`${broken}/package.json`, JSON.stringify({
472442
name: 'repo',
@@ -822,11 +792,6 @@ t.test('gitSubdir extraction', { skip: isWindows && 'posix only' }, async t => {
822792

823793
await mkdir(subdirRepo, { recursive: true })
824794
await git('init')
825-
await git('config', 'user.name', 'pacotedev')
826-
await git('config', 'user.email', 'i+pacotedev@izs.me')
827-
await git('config', 'tag.gpgSign', 'false')
828-
await git('config', 'commit.gpgSign', 'false')
829-
await git('config', 'tag.forceSignAnnotated', 'false')
830795

831796
// root package.json (should be ignored)
832797
await write('package.json', JSON.stringify({

0 commit comments

Comments
 (0)