@@ -296,6 +296,9 @@ describe('test/core/service/BinarySyncerService/executeTask.test.ts', () => {
296
296
return {
297
297
items : [
298
298
{ name : 'latest/' , isDir : true , url : '' , size : '-' , date : '17-Dec-2021 23:17' } ,
299
+ { name : 'old/' , isDir : true , url : '' , size : '-' , date : '15-Dec-2021 23:17' } ,
300
+ // old2 使用 yyyy-mm-dd 日期格式,用于检查 diff 的日期排序
301
+ { name : 'old2/' , isDir : true , url : '' , size : '-' , date : '2021-11-10T05:49:35.321Z' } ,
299
302
{ name : 'index.json' , isDir : false , url : 'https://nodejs.org/dist/index.json' , size : '219862' , date : '17-Dec-2021 23:16' } ,
300
303
] ,
301
304
} ;
@@ -324,7 +327,7 @@ describe('test/core/service/BinarySyncerService/executeTask.test.ts', () => {
324
327
assert ( stream ) ;
325
328
let log = await TestUtil . readStreamToLog ( stream ) ;
326
329
// console.log(log);
327
- assert ( log . includes ( 'Syncing diff: 2 => 2 ' ) ) ;
330
+ assert ( log . includes ( 'Syncing diff: 4 => 4 ' ) ) ;
328
331
assert ( log . includes ( '[/] 🟢 Synced dir success' ) ) ;
329
332
assert ( log . includes ( '[/latest/] 🟢 Synced dir success' ) ) ;
330
333
assert ( log . includes ( '[/latest/docs/] 🟢 Synced dir success' ) ) ;
@@ -339,9 +342,9 @@ describe('test/core/service/BinarySyncerService/executeTask.test.ts', () => {
339
342
log = await TestUtil . readStreamToLog ( stream ) ;
340
343
// console.log(log);
341
344
assert ( log . includes ( 'reason: revalidate latest version' ) ) ;
342
- assert ( log . includes ( 'Syncing diff: 2 => 1' ) ) ;
345
+ assert ( log . includes ( 'Syncing diff: 4 => 1' ) ) ;
343
346
assert ( log . includes ( '[/] 🟢 Synced dir success' ) ) ;
344
-
347
+ assert ( log . includes ( '[/latest/] 🟢 Synced dir success' ) ) ;
345
348
// mock version change
346
349
// console.log(binaryRepository.findBinary('node'));
347
350
0 commit comments