Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ability to add notes to a test #593

Merged
merged 3 commits into from May 24, 2016
Merged

Support ability to add notes to a test #593

merged 3 commits into from May 24, 2016

Conversation

@geek
Copy link
Member

geek commented May 24, 2016

Closes #402

@geek geek added this to the 10.7.0 milestone May 24, 2016
@geek geek assigned geek and unassigned geek May 24, 2016
item.notes = [];
done.note = (note) => {

item.notes.push(note);

This comment has been minimized.

Copy link
@AdriVanHoudt

AdriVanHoudt May 24, 2016

Contributor

why not return done as suggested in the issue? seems like a handy thing

This comment has been minimized.

Copy link
@geek

geek May 24, 2016

Author Member

for stringing notes together?

done().note().note().note(); ?

This comment has been minimized.

Copy link
@AdriVanHoudt

AdriVanHoudt May 24, 2016

Contributor

also but also so you can do done.note('Took: ' + elapsed + 'ms')();

This comment has been minimized.

Copy link
@Marsup

Marsup May 24, 2016

Member

Agreed, this doesn't hurt having it.

@Marsup

This comment has been minimized.

Copy link
Member

Marsup commented May 24, 2016

Too bad people using promises won't be able to use that.

README.md Outdated
@@ -183,6 +183,24 @@ lab.experiment('with only', () => {
});
```

The `test()` callback has a `note` function attached to it that can be used to

This comment has been minimized.

Copy link
@hueniverse
README.md Outdated
});
```

Multiple notes can be appended for the same test case by simply calling `note`

This comment has been minimized.

Copy link
@hueniverse
@hueniverse hueniverse merged commit faebd68 into hapijs:master May 24, 2016
2 checks passed
2 checks passed
Node Security No known vulnerabilities found
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.