瀏覽代碼

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();
     });
   });