@@ -719,7 +719,7 @@ describe("SharedHttpTest", () => {
719719 const variables = { params : "stub" } ;
720720 const link = new BatchHttpLink ( {
721721 uri : "/data" ,
722- credentials : "same-team-yo " ,
722+ credentials : "include " ,
723723 } ) ;
724724
725725 const stream = new ObservableStream (
@@ -730,19 +730,19 @@ describe("SharedHttpTest", () => {
730730 await expect ( stream ) . toComplete ( ) ;
731731
732732 const creds = fetchMock . lastCall ( ) ! [ 1 ] ! . credentials ;
733- expect ( creds ) . toBe ( "same-team-yo " ) ;
733+ expect ( creds ) . toBe ( "include " ) ;
734734 } ) ;
735735
736736 it ( "prioritizes creds from the context over the setup" , async ( ) => {
737737 const variables = { params : "stub" } ;
738738 const middleware = new ApolloLink ( ( operation , forward ) => {
739739 operation . setContext ( {
740- credentials : "same-team-yo " ,
740+ credentials : "omit " ,
741741 } ) ;
742742 return forward ( operation ) ;
743743 } ) ;
744744 const link = middleware . concat (
745- new BatchHttpLink ( { uri : "/data" , credentials : "error " } )
745+ new BatchHttpLink ( { uri : "/data" , credentials : "include " } )
746746 ) ;
747747
748748 const stream = new ObservableStream (
@@ -753,7 +753,7 @@ describe("SharedHttpTest", () => {
753753 await expect ( stream ) . toComplete ( ) ;
754754
755755 const creds = fetchMock . lastCall ( ) ! [ 1 ] ! . credentials ;
756- expect ( creds ) . toBe ( "same-team-yo " ) ;
756+ expect ( creds ) . toBe ( "omit " ) ;
757757 } ) ;
758758
759759 it ( "adds uri to the request from the context" , async ( ) => {
@@ -801,7 +801,7 @@ describe("SharedHttpTest", () => {
801801 return forward ( operation ) ;
802802 } ) ;
803803 const link = middleware . concat (
804- new BatchHttpLink ( { uri : "/data" , credentials : "error " } )
804+ new BatchHttpLink ( { uri : "/data" , credentials : "include " } )
805805 ) ;
806806
807807 const stream = new ObservableStream (
@@ -839,7 +839,7 @@ describe("SharedHttpTest", () => {
839839 const variables = { params : "stub" } ;
840840 const link = new BatchHttpLink ( {
841841 uri : "/data" ,
842- fetchOptions : { someOption : "foo" , mode : "no-cors" } ,
842+ fetchOptions : { mode : "no-cors" } ,
843843 } ) ;
844844
845845 const stream = new ObservableStream (
@@ -849,8 +849,7 @@ describe("SharedHttpTest", () => {
849849 await expect ( stream ) . toEmitTypedValue ( data ) ;
850850 await expect ( stream ) . toComplete ( ) ;
851851
852- const { someOption, mode, headers } = fetchMock . lastCall ( ) ! [ 1 ] ! as any ;
853- expect ( someOption ) . toBe ( "foo" ) ;
852+ const { mode, headers } = fetchMock . lastCall ( ) ! [ 1 ] ! as any ;
854853 expect ( mode ) . toBe ( "no-cors" ) ;
855854 expect ( headers [ "content-type" ] ) . toBe ( "application/json" ) ;
856855 } ) ;
@@ -902,13 +901,13 @@ describe("SharedHttpTest", () => {
902901 const middleware = new ApolloLink ( ( operation , forward ) => {
903902 operation . setContext ( {
904903 fetchOptions : {
905- someOption : "foo " ,
904+ mode : "cors " ,
906905 } ,
907906 } ) ;
908907 return forward ( operation ) ;
909908 } ) ;
910909 const link = middleware . concat (
911- new BatchHttpLink ( { uri : "/data" , fetchOptions : { someOption : "bar " } } )
910+ new BatchHttpLink ( { uri : "/data" , fetchOptions : { mode : "no-cors " } } )
912911 ) ;
913912
914913 const stream = new ObservableStream (
@@ -918,8 +917,8 @@ describe("SharedHttpTest", () => {
918917 await expect ( stream ) . toEmitTypedValue ( data ) ;
919918 await expect ( stream ) . toComplete ( ) ;
920919
921- const { someOption } = fetchMock . lastCall ( ) ! [ 1 ] ! as any ;
922- expect ( someOption ) . toBe ( "foo " ) ;
920+ const { mode } = fetchMock . lastCall ( ) ! [ 1 ] ! as any ;
921+ expect ( mode ) . toBe ( "cors " ) ;
923922 } ) ;
924923
925924 it ( "allows for not sending the query with the request" , async ( ) => {
0 commit comments