Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

files.ls ordering incorrect #7

Closed
alanshaw opened this issue Aug 6, 2018 · 0 comments · Fixed by #9
Closed

files.ls ordering incorrect #7

alanshaw opened this issue Aug 6, 2018 · 0 comments · Fixed by #9

Comments

@alanshaw
Copy link

alanshaw commented Aug 6, 2018

Currently in js-ipfs master:

1) interface-ipfs-core over ipfs-api tests .files.ls should ls directory:

    Uncaught AssertionError: expected [ Array(2) ] to deeply equal [ Array(2) ]
    + expected - actual

     [
       {
         "hash": ""
    -    "name": "b"
    +    "name": "lv1"
         "size": 0
         "type": 0
       }
       {
         "hash": ""
    -    "name": "lv1"
    +    "name": "b"
         "size": 0
         "type": 0
       }
     ]
    
    at ipfs.files.ls (node_modules/interface-ipfs-core/js/src/files/ls.js:56:27)
    at transform (node_modules/ipfs-api/src/files/ls.js:8:3)
    at send (node_modules/ipfs-api/src/utils/send-request.js:217:7)
    at f (node_modules/once/once.js:25:25)
    at streamToValue (node_modules/ipfs-api/src/utils/stream-to-json-value.js:30:5)
    at concat (node_modules/ipfs-api/src/utils/stream-to-value.js:12:22)
    at ConcatStream.<anonymous> (node_modules/concat-stream/index.js:37:43)
    at finishMaybe (node_modules/readable-stream/lib/_stream_writable.js:630:14)
    at afterWrite (node_modules/readable-stream/lib/_stream_writable.js:492:3)
    at _combinedTickCallback (internal/process/next_tick.js:144:20)
    at process._tickDomainCallback (internal/process/next_tick.js:218:9)

2) interface-ipfs-core over ipfs-api tests .files.ls should ls -l directory:

    Uncaught AssertionError: expected [ Array(2) ] to deeply equal [ Array(2) ]
    + expected - actual

     [
       {
    +    "hash": "QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn"
    +    "name": "lv1"
    +    "size": 0
    +    "type": 1
    +  }
    +  {
         "hash": "QmcZojhwragQr5qhTeFAmELik623Z21e3jBTpJXoQ9si1T"
         "name": "b"
         "size": 13
         "type": 0
       }
    -  {
    -    "hash": "QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn"
    -    "name": "lv1"
    -    "size": 0
    -    "type": 1
    -  }
     ]
    
    at ipfs.files.ls (node_modules/interface-ipfs-core/js/src/files/ls.js:76:27)
    at transform (node_modules/ipfs-api/src/files/ls.js:8:3)
    at send (node_modules/ipfs-api/src/utils/send-request.js:217:7)
    at f (node_modules/once/once.js:25:25)
    at streamToValue (node_modules/ipfs-api/src/utils/stream-to-json-value.js:30:5)
    at concat (node_modules/ipfs-api/src/utils/stream-to-value.js:12:22)
    at ConcatStream.<anonymous> (node_modules/concat-stream/index.js:37:43)
    at finishMaybe (node_modules/readable-stream/lib/_stream_writable.js:630:14)
    at afterWrite (node_modules/readable-stream/lib/_stream_writable.js:492:3)
    at _combinedTickCallback (internal/process/next_tick.js:144:20)
    at process._tickDomainCallback (internal/process/next_tick.js:218:9)
alanshaw added a commit to ipfs/js-ipfs that referenced this issue Aug 6, 2018
Pending resolution of ipfs-inactive/js-ipfs-mfs#7

License: MIT
Signed-off-by: Alan Shaw <[email protected]>
alanshaw added a commit to ipfs/js-ipfs that referenced this issue Aug 6, 2018
alanshaw added a commit to ipfs/js-ipfs that referenced this issue Aug 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant