Skip to content
This repository has been archived by the owner on Jul 11, 2019. It is now read-only.

Add tests and update link regex #9

Merged
merged 4 commits into from
May 2, 2015
Merged

Conversation

ekmartin
Copy link
Member

@ekmartin ekmartin commented May 2, 2015

This adds tests for most of the rich-message functionality. I used tape since it was already added to package.json, but wouldn't take much time to change it if another framework is preferred.
#8 happens because the regex mathes overlap, this should fix it. This'll however turn the #channel part of #channel!$#$# into a link, but I'm not sure if that's a bad thing. If emoji channel names are to be supported it'd need an update though.

@ungoldman
Copy link
Member

Thanks for adding tests!

re:

This'll however turn the #channel part of #channel!$#$# into a link, but I'm not sure if that's a bad thing

I think that's a bad thing. It should ensure there's a space afterwards.

@ekmartin
Copy link
Member Author

ekmartin commented May 2, 2015

Agreed, I'll look into it.

@ekmartin
Copy link
Member Author

ekmartin commented May 2, 2015

Got it working with a positive lookahead regex, updated the channel link test to match the behavior.

ungoldman added a commit that referenced this pull request May 2, 2015
Add tests and update link regex
@ungoldman ungoldman merged commit 4a6d61a into moose-team:master May 2, 2015
@ungoldman
Copy link
Member

👍

@ungoldman
Copy link
Member

Any reason you switched tap-spec to tap-dot for tap output?

@ungoldman
Copy link
Member

@ekmartin ^

@ekmartin
Copy link
Member Author

ekmartin commented May 2, 2015

It might have been something I did wrong, but it didn't seem like tap-spec showed diff output when stuff like t.equal(true, false) failed, which tap-dot did. Thought I wrote it in the commit message, but just change it back if you prefer tab-spec.

@ekmartin ekmartin deleted the regex_fix branch May 2, 2015 21:24
@ungoldman
Copy link
Member

@ekmartin ah yeah that's annoying. I think they're working on adding it in but it doesn't look like they're in a hurry.

scottcorgan/tap-spec#29

Makes sense to me to have better error output. I just like seeing the test names and checks and such when everything's fine too but until tap-spec has better error output, tap-dot is a lot more useful.

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.

None yet

2 participants