Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

651 B
Raw Blame
import { expect } from 'vitest'

import { gitTest } from '../../setup.js'
import { HOST, PASSWORD, PROTOCOL, USERNAME } from './helpers.js'

gitTest('git dangerouslyAuthenticate sets helper', async ({ sandbox }) => {
  await sandbox.git.dangerouslyAuthenticate({
    username: USERNAME,
    password: PASSWORD,
    host: HOST,
    protocol: PROTOCOL,
  })

  const helper = (
    await sandbox.commands.run('git config --global --get credential.helper')
  ).stdout.trim()
  const configuredHelper = await sandbox.git.getConfig('credential.helper', {
    scope: 'global',
  })
  expect(helper).toBe('store')
  expect(configuredHelper).toBe('store')
})