mirror of
https://github.com/immich-app/immich.git
synced 2024-12-26 10:50:29 +02:00
refactor(server): use .toSorted (#10904)
This commit is contained in:
parent
01706ccf5c
commit
59cdbdc492
@ -202,7 +202,7 @@ describe(StorageRepository.name, () => {
|
|||||||
.filter((entry) => entry[1])
|
.filter((entry) => entry[1])
|
||||||
.map(([file]) => file);
|
.map(([file]) => file);
|
||||||
|
|
||||||
expect(actual.sort()).toEqual(expected.sort());
|
expect(actual.toSorted()).toEqual(expected.toSorted());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -255,13 +255,11 @@ describe(AssetMediaService.name, () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
it('should be sorted (valid)', () => {
|
it('should be sorted (valid)', () => {
|
||||||
// TODO: use toSorted in NodeJS 20.
|
expect(valid).toEqual(valid.toSorted());
|
||||||
expect(valid).toEqual([...valid].sort());
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be sorted (invalid)', () => {
|
it('should be sorted (invalid)', () => {
|
||||||
// TODO: use toSorted in NodeJS 20.
|
expect(invalid).toEqual(invalid.toSorted());
|
||||||
expect(invalid).toEqual([...invalid].sort());
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -145,7 +145,7 @@ describe('mimeTypes', () => {
|
|||||||
|
|
||||||
it('should be a sorted list', () => {
|
it('should be a sorted list', () => {
|
||||||
const keys = Object.keys(mimeTypes.video);
|
const keys = Object.keys(mimeTypes.video);
|
||||||
expect(keys).toEqual([...keys].sort());
|
expect(keys).toEqual(keys.toSorted());
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should contain only video mime types', () => {
|
it('should contain only video mime types', () => {
|
||||||
@ -171,7 +171,7 @@ describe('mimeTypes', () => {
|
|||||||
|
|
||||||
it('should be a sorted list', () => {
|
it('should be a sorted list', () => {
|
||||||
const keys = Object.keys(mimeTypes.sidecar);
|
const keys = Object.keys(mimeTypes.sidecar);
|
||||||
expect(keys).toEqual([...keys].sort());
|
expect(keys).toEqual(keys.toSorted());
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should contain only xml mime types', () => {
|
it('should contain only xml mime types', () => {
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"target": "es2022",
|
"target": "es2022",
|
||||||
"moduleResolution": "node16",
|
"moduleResolution": "node16",
|
||||||
|
"lib": ["dom", "es2023"],
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"incremental": true,
|
"incremental": true,
|
||||||
|
Loading…
Reference in New Issue
Block a user