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

test: remove dependency on init doc hashes #391

Merged
merged 2 commits into from
Sep 29, 2016
Merged

Conversation

dignifiedquire
Copy link
Contributor

Fixes #365

@dignifiedquire
Copy link
Contributor Author

@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')
Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay

Copy link
Contributor Author

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')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

Copy link
Contributor Author

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
Copy link
Contributor

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!

Copy link
Contributor Author

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

@daviddias daviddias merged commit dd4752f into master Sep 29, 2016
@daviddias daviddias deleted the fix/no-init-docs branch September 29, 2016 14:08
@ghost
Copy link

ghost commented Sep 29, 2016

thanks <3

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 this pull request may close these issues.

2 participants