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

Less skipped tests #494

Merged
merged 3 commits into from
Sep 15, 2016
Merged

Less skipped tests #494

merged 3 commits into from
Sep 15, 2016

Conversation

dignifiedquire
Copy link
Member

I found some tests that were skipped and resulted in actual broken code. This is fixed now and things are more http-api and interface-ipfs-core compliant than before :)

@@ -60,14 +60,15 @@ module.exports = (ctl) => {
it('.get updatedConfig', (done) => {
ctl.config.get((err, config) => {
expect(err).not.to.exist
expect(config).to.deep.equal(updatedConfig())
console.log(config, updatedConfig())
Copy link
Member

Choose a reason for hiding this comment

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

probably remove this

Copy link
Member Author

Choose a reason for hiding this comment

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

why? ;)

Copy link
Member

@victorb victorb Sep 15, 2016

Choose a reason for hiding this comment

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

Is a console.log in the tests? Serves no purpose, seems to have been leftover from debugging.

Copy link
Member Author

Choose a reason for hiding this comment

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

It was a joke, that's why I wrote the ;). Already removed

Copy link
Member

Choose a reason for hiding this comment

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

Ah, sorry, went way above my head 😿

Copy link
Member Author

Choose a reason for hiding this comment

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

No worries 😸 jokes are somtimes hard to understand on the internetz

expect(res.result.version).to.equal(pkgversion)
expect(res.result).to.have.a.property('commit')
expect(res.result).to.have.a.property('repo')
expect(res.result).to.have.a.property('Version', pkgversion)
Copy link
Member

Choose a reason for hiding this comment

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

Should not actually check the version rather than just making sure something is there?

Copy link
Member

Choose a reason for hiding this comment

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

Suggestion would be to read version from somewhere, then assert with that, rather than hard coding the version

Copy link
Member Author

Choose a reason for hiding this comment

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

that's exactly what is happening here, pkgversion is read from package.json which is the version that js-ipfs uses as baseline when answering the version command.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, crap, you're right, as always. I'll never get used to Chai/Expect syntax...

}

console.log(`js-ipfs version: ${version}`)
console.log(`js-ipfs version: ${version.version}`)
Copy link
Member

Choose a reason for hiding this comment

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

Should probably use the logger that I've created before, instead of using console.log

Copy link
Member Author

Choose a reason for hiding this comment

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

Let's open an issue for that, and do the conversion, if we do it at once, rather than here and there.

Copy link
Member

@victorb victorb Sep 15, 2016

Choose a reason for hiding this comment

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

Sounds good to me. #495

console.log(JSON.stringify(value, null, 2))
} else {
console.log(value)
}
Copy link
Member

Choose a reason for hiding this comment

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

Same here as below, we should probably try using the logger rather than console.log

Copy link
Member

Choose a reason for hiding this comment

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

we can make that in a single PR and change all of them, no?

@daviddias
Copy link
Member

5 🌟

@daviddias daviddias merged commit d177d01 into master Sep 15, 2016
@daviddias daviddias deleted the fix/less-skipping branch September 15, 2016 18:35
@daviddias daviddias removed the status/in-progress In progress label Sep 15, 2016
MicrowaveDev pushed a commit to galtproject/js-ipfs that referenced this pull request May 22, 2020
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.

3 participants