You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test data is incomplete. That test should be compensated by using another test data.
Suggestion
Here is what i suggested.
...
// my suggestionit('should show order of sorted floates (a bit wrong)',function(){i1.values({val: '0.5'})i2.values({val: '0.26'})i3.values({val: '0.040'})i4.values({val: '0.50'})i5.values({val: '0.500'})i6.values({val: '0.3'})list.sort('val',{order: 'asc'})expect(list.items[0].values().val).toBe('0.040')expect(list.items[1].values().val).toBe('0.26')expect(list.items[2].values().val).toBe('0.3')expect(list.items[3].values().val).toBe('0.5')expect(list.items[4].values().val).toBe('0.50')expect(list.items[5].values().val).toBe('0.500')})...
Test result
list js sort floating number by ..
So when list js compare 0.5 and 0.26, 0.26 is bigger than 0.5 because list js recognize 0.5 to 5 and 0.26 to 26.
The text was updated successfully, but these errors were encountered:
xi-jjun
added a commit
to xi-jjun/list.js
that referenced
this issue
Jun 3, 2023
Issue
When i sort the floating numbers by list js sort function, there is some problem.
Problem
I find some problem in sort.test.js code.
The test data is incomplete. That test should be compensated by using another test data.
Suggestion
Here is what i suggested.
Test result
list js
sort floating number by.
.list js
compare0.5
and0.26
,0.26
is bigger than0.5
becauselist js
recognize0.5
to5
and0.26
to26
.The text was updated successfully, but these errors were encountered: