@autofleet/sheilta 1.2.9-beta → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -135,13 +135,13 @@ describe('formatting test', () => {
|
|
|
135
135
|
const { order } = _1.default({
|
|
136
136
|
order: ['startTime', '-endTime'],
|
|
137
137
|
});
|
|
138
|
-
expect(JSON.stringify(order)).toBe(JSON.stringify([['startTime'], ['endTime', 'DESC']]));
|
|
138
|
+
expect(JSON.stringify(order)).toBe(JSON.stringify([['startTime'], ['endTime', 'DESC'], ['id']]));
|
|
139
139
|
});
|
|
140
140
|
it('simple check asc', () => {
|
|
141
141
|
const { order } = _1.default({
|
|
142
142
|
order: ['startTime', 'endTime'],
|
|
143
143
|
});
|
|
144
|
-
expect(JSON.stringify(order)).toBe(JSON.stringify([['startTime'], ['endTime']]));
|
|
144
|
+
expect(JSON.stringify(order)).toBe(JSON.stringify([['startTime'], ['endTime'], ['id']]));
|
|
145
145
|
});
|
|
146
146
|
it('by included model', () => {
|
|
147
147
|
const { order } = _1.default({
|
|
@@ -154,7 +154,7 @@ describe('formatting test', () => {
|
|
|
154
154
|
status: {},
|
|
155
155
|
},
|
|
156
156
|
});
|
|
157
|
-
expect(JSON.stringify(order)).toBe(JSON.stringify([['status', 'name']]));
|
|
157
|
+
expect(JSON.stringify(order)).toBe(JSON.stringify([['status', 'name'], ['id']]));
|
|
158
158
|
});
|
|
159
159
|
it('by included model descending', () => {
|
|
160
160
|
const { order } = _1.default({
|
|
@@ -167,7 +167,7 @@ describe('formatting test', () => {
|
|
|
167
167
|
status: {},
|
|
168
168
|
},
|
|
169
169
|
});
|
|
170
|
-
expect(JSON.stringify(order)).toBe(JSON.stringify([['status', 'name', 'DESC']]));
|
|
170
|
+
expect(JSON.stringify(order)).toBe(JSON.stringify([['status', 'name', 'DESC'], ['id']]));
|
|
171
171
|
});
|
|
172
172
|
it('by json field', () => {
|
|
173
173
|
const { order } = _1.default({
|
|
@@ -177,7 +177,7 @@ describe('formatting test', () => {
|
|
|
177
177
|
startTime: '', endTime: '', currencySymbol: '', currencyCode: '', startStationId: '', json: '',
|
|
178
178
|
},
|
|
179
179
|
});
|
|
180
|
-
expect(JSON.stringify(order)).toBe(JSON.stringify([['status.name']]));
|
|
180
|
+
expect(JSON.stringify(order)).toBe(JSON.stringify([['status.name'], ['id']]));
|
|
181
181
|
});
|
|
182
182
|
it('by json field descending', () => {
|
|
183
183
|
const { order } = _1.default({
|
|
@@ -187,7 +187,7 @@ describe('formatting test', () => {
|
|
|
187
187
|
startTime: '', endTime: '', currencySymbol: '', currencyCode: '', startStationId: '', json: '',
|
|
188
188
|
},
|
|
189
189
|
});
|
|
190
|
-
expect(JSON.stringify(order)).toBe(JSON.stringify([['status.name', 'DESC']]));
|
|
190
|
+
expect(JSON.stringify(order)).toBe(JSON.stringify([['status.name', 'DESC'], ['id']]));
|
|
191
191
|
});
|
|
192
192
|
});
|
|
193
193
|
describe('include formatting', () => {
|