-
Notifications
You must be signed in to change notification settings - Fork 299
test: remove dependency on init doc hashes #391
Conversation
@lgierth @whyrusleeping this should fix your ci issues |
expect(err).to.not.exist | ||
|
||
expect(res).to.have.a.property('Objects') | ||
expect(res.Objects[0]).to.have.a.property('Links') | ||
expect(res.Objects[0]).to.have.property('Hash', 'QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG') | ||
expect(res.Objects[0]).to.have.property('Hash') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the hash value is not being checked anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
ipfs.util.addFromFs(filesPath, { recursive: true }, cb) | ||
}, | ||
(hashes, cb) => { | ||
folderHash = hashes[hashes.length - 1].hash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although we should use the value returned to make sure we are fetching the correct one, we should also have the expected hash hard coded, we've captured bugs in the past because the browser was adding different stuff then what it was added in Node.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
.then((res) => { | ||
expect(res).to.have.a.property('Objects') | ||
expect(res.Objects[0]).to.have.a.property('Links') | ||
expect(res.Objects[0]).to.have.property('Hash', 'QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG') | ||
expect(res.Objects[0]).to.have.property('Hash') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -57,13 +67,11 @@ describe('ls', function () { | |||
|
|||
describe('promise', () => { | |||
it('should correctly retrieve links', () => { | |||
if (!isNode) return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works all in the browser now? Sweet!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, I just moved the isNode
check to the top of the test
thanks <3 |
Fixes #365