Skip to content

Conversation

@hackergrrl
Copy link
Contributor

The README example could still use work (e.g. demonstrate how we might use it in js-ipfs proper).

function run () {
new Repo('', {})
}
expect(run).to.throw(Error)
Copy link
Member

@dignifiedquire dignifiedquire Apr 21, 2016

Choose a reason for hiding this comment

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

There is a nice way I found for doing this using arrow functions

expect(
  () => new Repo('', {})
).to.throw(
  Error
)

@daviddias
Copy link
Member

Seems that linting is failing cause of the new without assignment

@hackergrrl
Copy link
Contributor Author

Managed to trick the linter.

@daviddias
Copy link
Member

woot. Thank you @noffle :)

@daviddias daviddias merged commit a8ce3a6 into ipfs:master Apr 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants