File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export const use_infra_store = defineStore("infra", {
4848 actions : {
4949 async create_backend ( ) {
5050 if ( this . status === Status . CREATED ) return
51- navigator . locks . request ( "infra.create_backend" , async ( lock ) => {
51+ return navigator . locks . request ( "infra.create_backend" , async ( lock ) => {
5252 this . status = Status . CREATING
5353 if ( this . status === Status . CREATED ) return
5454 console . log ( "LOCK GRANTED !" , lock )
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ export const use_viewer_store = defineStore("viewer", {
5959 async ws_connect ( ) {
6060 if ( process . env . NODE_ENV == "test" ) return
6161 if ( this . status === Status . CONNECTED ) return
62- navigator . locks . request ( "viewer.ws_connect" , async ( lock ) => {
62+ return navigator . locks . request ( "viewer.ws_connect" , async ( lock ) => {
6363 if ( this . status === Status . CONNECTED ) return
6464 console . log ( "VIEWER LOCK GRANTED !" , lock )
6565 this . status = Status . CONNECTING
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ describe("Infra Store", () => {
123123 test ( "test without end-point" , async ( ) => {
124124 await infra_store . create_backend ( )
125125 console . log ( "geode_store.status" , geode_store . status )
126- expect ( infra_store . status ) . toBe ( Status . CREATING )
126+ expect ( infra_store . status ) . toBe ( Status . NOT_CREATED )
127127 expect ( geode_store . status ) . toBe ( Status . NOT_CONNECTED )
128128 expect ( viewer_store . status ) . toBe ( Status . NOT_CONNECTED )
129129 } )
@@ -133,10 +133,10 @@ describe("Infra Store", () => {
133133 handler : ( ) => ( { ID : "123456" } ) ,
134134 } )
135135 await infra_store . create_backend ( )
136- expect ( infra_store . status ) . toBe ( Status . CREATING )
136+ expect ( infra_store . status ) . toBe ( Status . CREATED )
137137 expect ( geode_store . status ) . toBe ( Status . NOT_CONNECTED )
138138 expect ( viewer_store . status ) . toBe ( Status . NOT_CONNECTED )
139- expect ( feedback_store . server_error ) . toBe ( false )
139+ expect ( feedback_store . server_error ) . toBe ( true )
140140 } )
141141 } )
142142 } )
You can’t perform that action at this time.
0 commit comments