How to use the interface-ipfs-core.filesRegular function in interface-ipfs-core

To help you get started, we’ve selected a few interface-ipfs-core 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 ipfs-shipyard / js-ipfs-http-client-lite / test / interface.spec.js View on Github external
//   },
    //   // dht.findprovs
    //   {
    //     name: 'should provide from one node and find it through another node',
    //     reason: 'FIXME go-ipfs endpoint doesn\'t conform with the others https://github.com/ipfs/go-ipfs/issues/5047'
    //   },
    //   // dht.get
    //   {
    //     name: 'should get a value after it was put on another node',
    //     reason: 'FIXME go-ipfs errors with  Error: key was not found (type 6) https://github.com/ipfs/go-ipfs/issues/3862'
    //   }
    // ]
    skip: { reason: 'LITE: not implemented yet' }
  })

  tests.filesRegular(defaultCommon, {
    skip: [
      // .add
      {
        name: 'should not be able to add by path',
        reason: 'LITE: TODO: rework this test - is supported here'
      },
      {
        name: 'should not be able to add a string',
        reason: 'LITE: TODO: rework this test - is supported here'
      },
      {
        name: 'should not be able to add a non-Buffer TypedArray',
        reason: 'LITE: TODO: rework this test - is supported here'
      },
      {
        name: 'should fail when passed invalid input',
github ipfs / js-ipfs-http-client / test / interface.spec.js View on Github external
{
        name: 'should ls directory with long option',
        reason: 'TODO unskip when go-ipfs supports --long https://github.com/ipfs/go-ipfs/pull/6528'
      },
      {
        name: 'should read from outside of mfs',
        reason: 'TODO not implemented in go-ipfs yet'
      },
      {
        name: 'should ls from outside of mfs',
        reason: 'TODO not implemented in go-ipfs yet'
      }
    ]
  })

  tests.filesRegular(commonFactory, {
    skip: [
      // .addFromFs
      isNode ? null : {
        name: 'addFromFs',
        reason: 'Not designed to run in the browser'
      },
      // .catPullStream
      {
        name: 'should export a chunk of a file',
        reason: 'TODO not implemented in go-ipfs yet'
      },
      {
        name: 'should export a chunk of a file in a Pull Stream',
        reason: 'TODO not implemented in go-ipfs yet'
      },
      {
github ipfs / js-ipfs / test / core / interface.spec.js View on Github external
tests.block(commonFactory)

  tests.bootstrap(commonFactory)

  tests.config(commonFactory)

  tests.dag(commonFactory)

  tests.dht(commonFactory, {
    skip: {
      reason: 'TODO: unskip when DHT is enabled: https://github.com/ipfs/js-ipfs/pull/1994'
    }
  })

  tests.filesRegular(commonFactory, {
    skip: isNode ? null : [{
      name: 'addFromStream',
      reason: 'Not designed to run in the browser'
    }, {
      name: 'addFromFs',
      reason: 'Not designed to run in the browser'
    }]
  })

  tests.filesMFS(commonFactory)

  tests.key(commonFactory)

  tests.miscellaneous(commonFactory)

  tests.name(createFactory(merge(commonOptions, {
github ipfs / js-ipfs / test / http-api / interface.js View on Github external
skip: [{
      name: 'should get only a CID, due to resolving locally only',
      reason: 'Local resolve option is not implemented yet'
    }, {
      name: 'tree',
      reason: 'dag.tree is not implemented yet'
    }]
  })

  tests.dht(commonFactory, {
    skip: {
      reason: 'TODO: unskip when DHT is enabled: https://github.com/ipfs/js-ipfs/pull/1994'
    }
  })

  tests.filesRegular(commonFactory, {
    skip: isNode ? null : [{
      name: 'addFromStream',
      reason: 'Not designed to run in the browser'
    }, {
      name: 'addFromFs',
      reason: 'Not designed to run in the browser'
    }]
  })

  tests.filesMFS(commonFactory)

  tests.key(commonFactory)

  tests.miscellaneous(commonFactory)

  tests.name(createFactory(merge(commonOptions, {