-
Notifications
You must be signed in to change notification settings - Fork 47
Use a string compatible prefix comparator #66
Conversation
/cc @50Wliu because I think this would help the ruby do/dop snippet situation. I'm not sure if spec are needed or how I'd write one. |
@jeancroy Specs are strongly preferred. Basically I would just write a bunch of tests describing sorting cases and the expected output. Extra credit for covering failure cases like people handing |
@lee-dohm would it be OK to test the sortComparator in isolation ? it's just the inner working of autocomplete-snippet i'm not sure. It looks like a glue package between the snippet package and autocomplete-plus. |
Yes, that's what I was thinking. |
Thanks @lee-dohm, for pushing for test, I blindly assumed at least the a.prefix part was right. It looks like result don't have a prefix property but a text one. |
You're welcome 👍 |
@@ -71,3 +71,27 @@ describe 'AutocompleteSnippets', -> | |||
runs -> | |||
atom.commands.dispatch(editorView, 'autocomplete-plus:confirm') | |||
expect(editor.getText()).toContain '} while (true);' | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 this newliine
Use a string compatible prefix comparator
fix #61.
May also help related issues