mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-09-10 17:58:02 +02:00
Fixing unit test reduce() failure that doesn't happen locally
This commit is contained in:
parent
6b11da158e
commit
7d08b10971
@ -10,7 +10,8 @@ async function loadTestDatabase(mockFileInfo) {
|
|||||||
let libraryItem1Id, libraryItem2Id
|
let libraryItem1Id, libraryItem2Id
|
||||||
|
|
||||||
let fileInfo = mockFileInfo || getMockFileInfo()
|
let fileInfo = mockFileInfo || getMockFileInfo()
|
||||||
let bookLibraryFiles = fileInfo.keys().reduce((acc, key) => {
|
// mapping the keys() iterable to an explicit array so reduce() should work consistently.
|
||||||
|
let bookLibraryFiles = [...fileInfo.keys()].reduce((acc, key) => {
|
||||||
let bookfile = new LibraryFile()
|
let bookfile = new LibraryFile()
|
||||||
bookfile.setDataFromPath(key, key)
|
bookfile.setDataFromPath(key, key)
|
||||||
acc.push(bookfile)
|
acc.push(bookfile)
|
||||||
|
Loading…
Reference in New Issue
Block a user