mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-04-21 22:49:46 +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 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…
Add table
Add a link
Reference in a new issue