mirror of
				https://github.com/zoriya/Kyoo.git
				synced 2025-10-31 02:27:11 -04:00 
			
		
		
		
	Fix need-rendering test
This commit is contained in:
		
							parent
							
								
									1a2ab48c73
								
							
						
					
					
						commit
						cf59695e09
					
				| @ -81,10 +81,11 @@ export const insertEntries = async ( | ||||
| 
 | ||||
| 	const vids = items.flatMap( | ||||
| 		(seed, i) => | ||||
| 			seed.videos?.map((x) => ({ | ||||
| 			seed.videos?.map((x, j) => ({ | ||||
| 				videoId: x, | ||||
| 				entryPk: retEntries[i].pk, | ||||
| 				needRendering: seed.videos!.length > 1, | ||||
| 				// The first video should not have a rendering.
 | ||||
| 				needRendering: j && seed.videos!.length > 1, | ||||
| 			})) ?? [], | ||||
| 	); | ||||
| 
 | ||||
|  | ||||
| @ -382,7 +382,6 @@ describe("Movie seeding", () => { | ||||
| 			}, | ||||
| 		]); | ||||
| 		expectStatus(vresp, video).toBe(201); | ||||
| 		console.log(video); | ||||
| 
 | ||||
| 		const [resp, body] = await createMovie({ | ||||
| 			...bubble, | ||||
| @ -390,7 +389,6 @@ describe("Movie seeding", () => { | ||||
| 			videos: [video[0].id, video[1].id], | ||||
| 		}); | ||||
| 		expectStatus(resp, body).toBe(201); | ||||
| 		console.log(body); | ||||
| 
 | ||||
| 		const ret = await db.query.shows.findFirst({ | ||||
| 			where: eq(shows.id, body.id), | ||||
| @ -401,9 +399,8 @@ describe("Movie seeding", () => { | ||||
| 		expect(ret!.entries[0].slug).toBe("bubble-rtest"); | ||||
| 		expect(ret!.entries[0].evj).toBeArrayOfSize(2); | ||||
| 		expect(ret!.entries[0].evj).toContainValues([ | ||||
| 			{ slug: "bubble-rtest-oeunhtoeuth" }, | ||||
| 			{ slug: "bubble-rtest-aoeuaoeu" }, | ||||
| 			{ slug: "bubble-rtest" }, | ||||
| 			expect.objectContaining({ slug: "bubble-rtest" }), | ||||
| 			expect.objectContaining({ slug: "bubble-rtest-aoeuaoeu" }), | ||||
| 		]); | ||||
| 	}); | ||||
| }); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user