File tree Expand file tree Collapse file tree 2 files changed +16
-19
lines changed Expand file tree Collapse file tree 2 files changed +16
-19
lines changed Original file line number Diff line number Diff line change 1- import { afterAll , beforeAll } from "vitest" ;
21import { describeAccuracyTests } from "./sdk/describeAccuracyTests.js" ;
32import { Matcher } from "./sdk/matcher.js" ;
43
5- let originalApiKey : string | undefined ;
6- beforeAll ( ( ) => {
7- originalApiKey = process . env . MDB_VOYAGE_API_KEY ;
8-
9- // We just need a valid key when registering the tool, the actual value is not important
10- if ( ! originalApiKey ) {
11- process . env . MDB_VOYAGE_API_KEY = "valid-key" ;
12- }
13- } ) ;
14- afterAll ( ( ) => {
15- process . env . MDB_VOYAGE_API_KEY = originalApiKey ;
16- } ) ;
4+ // TODO: supply this with a proper config API once we refactor describeAccuracyTests to support it
5+ process . env . MDB_VOYAGE_API_KEY = "valid-key" ;
176
187describeAccuracyTests ( [
198 {
Original file line number Diff line number Diff line change @@ -114,12 +114,20 @@ describeAccuracyTests([
114114 arguments : {
115115 pipeline : [
116116 {
117- $group : {
118- _id : "$release_year" ,
119- titles : {
120- $push : "$title" ,
121- } ,
122- } ,
117+ $group : Matcher . anyOf (
118+ Matcher . value ( {
119+ _id : "$release_year" ,
120+ titles : {
121+ $push : "$title" ,
122+ } ,
123+ } ) ,
124+ Matcher . value ( {
125+ _id : "$release_year" ,
126+ movies : {
127+ $push : "$title" ,
128+ } ,
129+ } )
130+ ) ,
123131 } ,
124132 ] ,
125133 } ,
You can’t perform that action at this time.
0 commit comments