@@ -18,6 +18,7 @@ import { makeRequestMock } from "../src/testing";
1818import { methods } from "../src/method" ;
1919import { CommonConfig , InputSources } from "../src/config-type" ;
2020import * as R from "ramda" ;
21+ import { afterAll } from "vitest" ;
2122
2223describe ( "Common Helpers" , ( ) => {
2324 describe ( "emptySchema" , ( ) => {
@@ -270,6 +271,10 @@ describe("Common Helpers", () => {
270271 } ) ;
271272
272273 describe ( "combinations()" , ( ) => {
274+ afterAll ( ( ) => {
275+ combinations . limit = Infinity ; // reset back
276+ } ) ;
277+
273278 test ( "should run callback on each combination of items from two arrays" , ( ) => {
274279 expect ( combinations ( [ 1 , 2 ] , [ 4 , 5 , 6 ] , R . add ) ) . toEqual ( [
275280 5 , 6 , 7 , 6 , 7 , 8 ,
@@ -290,7 +295,6 @@ describe("Common Helpers", () => {
290295 expect ( combinations ( [ 1 , 2 ] , [ 4 , 5 , 6 ] , R . add , 4 ) ) . toEqual ( [ 5 , 6 , 7 , 6 ] ) ;
291296 combinations . limit = 3 ;
292297 expect ( combinations ( [ 1 , 2 ] , [ 4 , 5 , 6 ] , R . add ) ) . toEqual ( [ 5 , 6 , 7 ] ) ;
293- combinations . limit = Infinity ;
294298 } ) ;
295299
296300 test . each ( [ 0 , - 1 , NaN ] ) ( "should return empty for limit=%s" , ( limit ) => {
0 commit comments