Commit 85947e95 authored by gumen's avatar gumen 🐢

Enable test for scenario with sorting more then 10 tags

I did full investigation of issue on my computer but it looks like
everything is working just fine.  I couldn't reproduce output "after"
from comment in skipped test.
parent 39c82a3c
......@@ -39,6 +39,5 @@ LINKS
TODO
Investigate sorting of over 10 tags - failing test in ./tests/main.js:209
Release first version
Mention plugin in https://github.com/prettier/prettier/issues/5659
......@@ -262,3 +262,23 @@ zająć się tematami wypisanymi w README.
czw, 30 sty 2020, 15:53:28 CET
Mergowałem PR. Dodałem prettiera do tego projektu.
sob, 22 lut 2020, 18:03:20 CET
Wreszcie znalazłem chwilę na dokończenie kilku spraw. Trzeba naprawić
sortowanie, wydać pierwszą wersję i wrzucić link do repo w starym
wątku Prettiera na httsp://github.com.
sob, 22 lut 2020, 19:30:23 CET
Dziwne. Zacząłem przygotowywać kod, przykłady i testy pod kątem
znalezienia błędów w sortowaniu ale wygląda na to, że "u mnie działa".
Zobaczę jeszcze dokładnie przykład jaki zostawił mi Wiktor, ale
wygląda na to, że problem nie leży po stronie tego kodu.
sob, 22 lut 2020, 19:34:14 CET
Nie jestem w stanie uzyskać takiego samego błędnego rezultatu jaki
miał Wiktor. Zrobię commita z działającym testem na kolejność tagów.
Dam też znać Wiktorowi żeby sprawdził u siebie czemu ten test nie
przechodzi. To musi być coś nie związanego z kodem.
......@@ -206,11 +206,7 @@ test('Should keep defined inner types', () => {
expect(Result5).toEqual(Expected5)
})
test.skip('Sould keep params ordering when more than 10 tags are present', () => {
// this is broken. seems to originate in sort. As a short investigation I've
// printed tags before and after sort and those are results:
// before = [{"title":"param","name":"test1","type":{"type":"NameExpression","name":"Number"}},{"title":"param","name":"test2","type":{"type":"NameExpression","name":"Number"}},{"title":"param","name":"test3","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"Number"},{"type":"NameExpression","name":"String"}],"name":"Number|String"}},{"title":"param","name":"test4","type":{"type":"NullableType","expression":{"type":"UndefinedLiteral"},"prefix":true,"name":"?undefined"}},{"title":"param","name":"test5","type":{"type":"NonNullableType","expression":{"type":"UndefinedLiteral"},"prefix":true,"name":"!undefined"}},{"title":"param","name":"test6","type":{"type":"AllLiteral","name":"*"}},{"title":"param","name":"test7","type":{"type":"NullableType","expression":{"type":"NameExpression","name":"Number"},"prefix":true,"name":"?Number"}},{"title":"param","name":"test8","type":{"type":"RestType","expression":{"type":"NameExpression","name":"Number"},"name":"...Number"}},{"title":"param","name":"test9","type":{"type":"NonNullableType","expression":{"type":"NameExpression","name":"Number"},"prefix":true,"name":"!Number"}},{"title":"return","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Object"},"applications":[{"type":"NameExpression","name":"string"},{"type":"UnionType","elements":[{"type":"NameExpression","name":"number"},{"type":"UndefinedLiteral"}]}]}],"name":"Promise.<Object.<string, number|undefined>>"}},{"title":"description"}]
// after = [{"title":"description"},{"title":"param","name":"test1","type":{"type":"NameExpression","name":"Number"}},{"title":"param","name":"test3","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"Number"},{"type":"NameExpression","name":"String"}],"name":"Number|String"}},{"title":"param","name":"test4","type":{"type":"NullableType","expression":{"type":"UndefinedLiteral"},"prefix":true,"name":"?undefined"}},{"title":"param","name":"test5","type":{"type":"NonNullableType","expression":{"type":"UndefinedLiteral"},"prefix":true,"name":"!undefined"}},{"title":"param","name":"test2","type":{"type":"NameExpression","name":"Number"}},{"title":"param","name":"test7","type":{"type":"NullableType","expression":{"type":"NameExpression","name":"Number"},"prefix":true,"name":"?Number"}},{"title":"param","name":"test8","type":{"type":"RestType","expression":{"type":"NameExpression","name":"Number"},"name":"...Number"}},{"title":"param","name":"test9","type":{"type":"NonNullableType","expression":{"type":"NameExpression","name":"Number"},"prefix":true,"name":"!Number"}},{"title":"param","name":"test6","type":{"type":"AllLiteral","name":"*"}},{"title":"return","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Object"},"applications":[{"type":"NameExpression","name":"string"},{"type":"UnionType","elements":[{"type":"NameExpression","name":"number"},{"type":"UndefinedLiteral"}]}]}],"name":"Promise.<Object.<string, number|undefined>>"}}]
test('Sould keep params ordering when more than 10 tags are present', () => {
const Result1 = subject(`/**
* description
* @param {Number} test1 Test param
......@@ -222,6 +218,8 @@ test.skip('Sould keep params ordering when more than 10 tags are present', () =>
* @param {?Number} test7 Test param
* @param {...Number} test8 Test param
* @param {!Number} test9 Test param
* @param {String} test10 Test param
* @param {Array} test11 Test param
* @return {Promise<Object<string, number|undefined>>} test return
*/`)
const Expected1 = `/**
......@@ -236,6 +234,8 @@ test.skip('Sould keep params ordering when more than 10 tags are present', () =>
* @param {?Number} test7 Test param
* @param {...Number} test8 Test param
* @param {!Number} test9 Test param
* @param {String} test10 Test param
* @param {Array} test11 Test param
* @return {Promise.<Object.<string, number|undefined>>} Test return
*/
`
......
* Golden Hour
:LOGBOOK:
CLOCK: [2020-02-22 sob 19:10]--[2020-02-22 sob 19:38] => 0:28
CLOCK: [2020-01-30 czw 16:39]--[2020-01-30 czw 17:23] => 0:44
CLOCK: [2020-01-30 czw 15:12]--[2020-01-30 czw 15:54] => 0:42
CLOCK: [2020-01-24 pią 15:54]--[2020-01-24 pią 16:42] => 0:48
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment