@@ -1348,7 +1348,7 @@ describe("ReflagClient", () => {
13481348 active : true ,
13491349 } ,
13501350 type : "company" ,
1351- userId : undefined ,
1351+ userId : user . id ,
13521352 } ,
13531353 {
13541354 attributes : {
@@ -1546,7 +1546,7 @@ describe("ReflagClient", () => {
15461546 employees : 100 ,
15471547 name : "Acme Inc." ,
15481548 } ,
1549- userId : undefined , // this is a bug, will fix in separate PR
1549+ userId : user . id ,
15501550 context : undefined ,
15511551 } ,
15521552 {
@@ -1635,7 +1635,14 @@ describe("ReflagClient", () => {
16351635 await client . initialize ( ) ;
16361636 client . getFlags ( { user, company, other : otherContext } ) ;
16371637
1638- expect ( isAllowedSpy ) . toHaveBeenCalledWith ( "1GHpP+QfYperQ0AtD8bWPiRE4H0=" ) ;
1638+ expect ( isAllowedSpy ) . toHaveBeenNthCalledWith (
1639+ 1 ,
1640+ "5Zt35h50IPRNU8yXAj/YbPME/qE=" ,
1641+ ) ;
1642+ expect ( isAllowedSpy ) . toHaveBeenNthCalledWith (
1643+ 2 ,
1644+ "J3G4oF56f2t+T6xYzES6inc78+c=" ,
1645+ ) ;
16391646 } ) ;
16401647
16411648 it ( "should return evaluated flags when only user is defined" , async ( ) => {
@@ -1901,7 +1908,7 @@ describe("ReflagClient", () => {
19011908 employees : 100 ,
19021909 name : "Acme Inc." ,
19031910 } ,
1904- userId : undefined , // this is a bug, will fix in separate PR
1911+ userId : user . id ,
19051912 context : undefined ,
19061913 } ,
19071914 {
@@ -2559,7 +2566,14 @@ describe("ReflagClient", () => {
25592566 await client . initialize ( ) ;
25602567 client . getFlagsForBootstrap ( { user, company, other : otherContext } ) ;
25612568
2562- expect ( isAllowedSpy ) . toHaveBeenCalledWith ( "1GHpP+QfYperQ0AtD8bWPiRE4H0=" ) ;
2569+ expect ( isAllowedSpy ) . toHaveBeenNthCalledWith (
2570+ 1 ,
2571+ "5Zt35h50IPRNU8yXAj/YbPME/qE=" ,
2572+ ) ;
2573+ expect ( isAllowedSpy ) . toHaveBeenNthCalledWith (
2574+ 2 ,
2575+ "J3G4oF56f2t+T6xYzES6inc78+c=" ,
2576+ ) ;
25632577 } ) ;
25642578
25652579 it ( "should work in offline mode" , async ( ) => {
0 commit comments