Closed jeancroy closed 8 years ago
/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 undefined
, null
or non-string input.
@lee-dohm would it be OK to test the sortComparator in isolation ? I can give an array of unsorted data, and try to sort using this.
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 :+1:
fix https://github.com/atom/autocomplete-snippets/issues/61. May also help related issues