mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	feat(1-3260): use match object to verify that status code series is included
This commit is contained in:
		
							parent
							
								
									ef5209fe57
								
							
						
					
					
						commit
						648fc6079c
					
				@ -245,10 +245,14 @@ test('can query for monthly aggregation of data for a specified range', async ()
 | 
				
			|||||||
                now,
 | 
					                now,
 | 
				
			||||||
                new Date(entry.month),
 | 
					                new Date(entry.month),
 | 
				
			||||||
            );
 | 
					            );
 | 
				
			||||||
 | 
					            const expectedCount = expectedValues[index];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            const expected = expectedValues[index];
 | 
					            expect(entry).toMatchObject({
 | 
				
			||||||
 | 
					                statusCodeSeries: 200,
 | 
				
			||||||
            expect(entry.count).toBe(expected[entry.trafficGroup]);
 | 
					                trafficGroup: expect.stringMatching(/group(A|B)/),
 | 
				
			||||||
 | 
					                month: expect.stringMatching(/\d{4}-\d{2}/),
 | 
				
			||||||
 | 
					                count: expectedCount[entry.trafficGroup],
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user