mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-20 02:39:38 +00:00
Fixing unit test reduce() failure that doesn't happen locally
This commit is contained in:
parent
6b11da158e
commit
7d08b10971
1 changed files with 2 additions and 1 deletions
|
|
@ -10,7 +10,8 @@ async function loadTestDatabase(mockFileInfo) {
|
|||
let libraryItem1Id, libraryItem2Id
|
||||
|
||||
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()
|
||||
bookfile.setDataFromPath(key, key)
|
||||
acc.push(bookfile)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue