How to use the isomorphic-git.cores.get function in isomorphic-git

To help you get started, weโ€™ve selected a few isomorphic-git examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github isomorphic-git / isomorphic-git / __tests__ / test-cores.js View on Github external
it('cores have separate plugins', async () => {
    // Setup
    const { _fs } = await makeFixture('test-cores')
    plugins.set('fs', _fs)
    cores.create('third').set('foo', _fs)
    expect(cores.get('default').has('fs')).toBeTruthy()
    expect(cores.get('default').has('foo')).toBeFalsy()
    expect(cores.get('third').has('fs')).toBeFalsy()
    expect(cores.get('third').get('foo')).toBeTruthy()
  })
  it('plugin schema violation', async () => {
github isomorphic-git / isomorphic-git / __tests__ / test-cores.js View on Github external
it('cores.get', async () => {
    // Setup
    const { _fs } = await makeFixture('test-cores')
    cores.get('default').set('fs', _fs)
    let error = null
    try {
      cores.get('first').set('fs', _fs)
    } catch (err) {
      error = err
    }
    expect(error).not.toBeNull()
    expect(error.code).toEqual(E.CoreNotFound)
  })
  it('core.create', async () => {
github isomorphic-git / isomorphic-git / __tests__ / test-cores.js View on Github external
it('cores.get', async () => {
    // Setup
    const { _fs } = await makeFixture('test-cores')
    cores.get('default').set('fs', _fs)
    let error = null
    try {
      cores.get('first').set('fs', _fs)
    } catch (err) {
      error = err
    }
    expect(error).not.toBeNull()
    expect(error.code).toEqual(E.CoreNotFound)
  })
  it('core.create', async () => {
github isomorphic-git / isomorphic-git / __tests__ / test-cores.js View on Github external
it('cores have separate plugins', async () => {
    // Setup
    const { _fs } = await makeFixture('test-cores')
    plugins.set('fs', _fs)
    cores.create('third').set('foo', _fs)
    expect(cores.get('default').has('fs')).toBeTruthy()
    expect(cores.get('default').has('foo')).toBeFalsy()
    expect(cores.get('third').has('fs')).toBeFalsy()
    expect(cores.get('third').get('foo')).toBeTruthy()
  })
  it('plugin schema violation', async () => {
github isomorphic-git / isomorphic-git / __tests__ / test-cores.js View on Github external
it('core.create', async () => {
    // Setup
    const { _fs } = await makeFixture('test-cores')
    cores.get('default').set('fs', _fs)
    let error = null
    try {
      cores.create('second').set('fs', _fs)
    } catch (err) {
      error = err
    }
    expect(error).toBeNull()
    expect(cores.get('second').get('fs')).toBe(_fs)
  })
  it('cores have separate plugins', async () => {
github isomorphic-git / isomorphic-git / __tests__ / test-cores.js View on Github external
it('cores have separate plugins', async () => {
    // Setup
    const { _fs } = await makeFixture('test-cores')
    plugins.set('fs', _fs)
    cores.create('third').set('foo', _fs)
    expect(cores.get('default').has('fs')).toBeTruthy()
    expect(cores.get('default').has('foo')).toBeFalsy()
    expect(cores.get('third').has('fs')).toBeFalsy()
    expect(cores.get('third').get('foo')).toBeTruthy()
  })
  it('plugin schema violation', async () => {
github isomorphic-git / isomorphic-git / __tests__ / test-cores.js View on Github external
it('plugins === cores.get(default)', async () => {
    expect(plugins).toBe(cores.get('default'))
  })
  it('cores.get', async () => {