فهرست منبع

Tests: handle debugpy returning multiple scopes

Jeremy Tuloup 4 سال پیش
والد
کامیت
72c09c96ad
1فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 4 2
      packages/debugger/test/session.spec.ts

+ 4 - 2
packages/debugger/test/session.spec.ts

@@ -230,8 +230,10 @@ describe('protocol', () => {
         frameId
       });
       const scopes = scopesReply.body.scopes;
-      expect(scopes.length).toEqual(1);
-      expect(scopes[0].name).toEqual('Locals');
+      expect(scopes.length).toBeGreaterThanOrEqual(1);
+
+      const locals = scopes.find(scope => scope.name === 'Locals');
+      expect(locals).toBeTruthy();
     });
   });