Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

test: another add recursive test #743

Merged
merged 2 commits into from
Jan 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"ipfs-multipart": "^0.1.0",
"ipfs-repo": "^0.11.2",
"ipfs-unixfs": "^0.1.9",
"ipfs-unixfs-engine": "^0.15.2",
"ipfs-unixfs-engine": "^0.15.4",
"ipld-resolver": "^0.4.3",
"isstream": "^0.1.2",
"libp2p-floodsub": "0.7.2",
Expand Down Expand Up @@ -171,4 +171,4 @@
"nginnever <[email protected]>",
"npmcdn-to-unpkg-bot <[email protected]>"
]
}
}
24 changes: 23 additions & 1 deletion test/cli/test-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe('files', () => {
})
})

it('add recursively', () => {
it('add recursively test 1', () => {
return ipfs('files add -r src/init-files/init-docs').then((out) => {
expect(out).to.be.eql([
'added QmYE7xo6NxbHEVEHej1yzxijYaNY51BaeKxjXxn6Ssa6Bs init-docs/tour/0.0-intro',
Expand All @@ -89,5 +89,27 @@ describe('files', () => {
].join('\n'))
})
})

it('add recursively test 2', () => {
return ipfs('files add -r test').then((out) => {
const nLines = out.split('\n').length
expect(nLines).to.be.above(10)
/*
expect(out).to.be.eql([
'added QmYE7xo6NxbHEVEHej1yzxijYaNY51BaeKxjXxn6Ssa6Bs init-docs/tour/0.0-intro',
'added QmciSU8hfpAXKjvK5YLUSwApomGSWN5gFbP4EpDAEzu2Te init-docs/tour',
'added QmTumTjvcYCAvRRwQ8sDRxh8ezmrcr88YFU7iYNroGGTBZ init-docs/security-notes',
'added QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB init-docs/readme',
'added QmdncfsVm2h5Kqq9hPmU7oAVX2zTSVP3L869tgTbPYnsha init-docs/quick-start',
'added QmY5heUM5qgRubMDD1og9fhCPA6QdkMp3QCwd4s7gJsyE7 init-docs/help',
'added QmQN88TEidd3RY2u3dpib49fERTDfKtDpvxnvczATNsfKT init-docs/docs/index',
'added QmegvLXxpVKiZ4b57Xs1syfBVRd8CbucVHAp7KpLQdGieC init-docs/docs',
'added QmYCvbfNbCwFR45HiNP45rwJgvatpiW38D961L5qAhUM5Y init-docs/contact',
'added QmZTR5bcpQD7cFgTorqxZDYaew1Wqgfbd2ud9QqGPAkK2V init-docs/about',
'added QmUhUuiTKkkK8J6JZ9zmj8iNHPuNfGYcszgRumzhHBxEEU init-docs'
].join('\n'))
*/
})
})
})
})