Forráskód Böngészése

Update test for loadedSources

Jeremy Tuloup 5 éve
szülő
commit
08169629be
1 módosított fájl, 5 hozzáadás és 8 törlés
  1. 5 8
      tests/src/session.spec.ts

+ 5 - 8
tests/src/session.spec.ts

@@ -264,14 +264,10 @@ describe('protocol', () => {
   });
 
   describe('#loadedSources', () => {
-    it('should retrieve the list of loaded sources', async () => {
-      const loadedSourcesReply = await debugSession.sendRequest(
-        'loadedSources',
-        {}
-      );
-      const sources = loadedSourcesReply.body.sources;
-      expect(sources).to.exist;
-      expect(sources.length).to.be.above(0);
+    it('should *not* retrieve the list of loaded sources', async () => {
+      // `loadedSources` is not supported at the moment "unknown command"
+      const reply = await debugSession.sendRequest('loadedSources', {});
+      expect(reply.success).to.be.false;
     });
   });
 
@@ -283,6 +279,7 @@ describe('protocol', () => {
       const frame = stackFramesReply.body.stackFrames[0];
       const source = frame.source;
       const reply = await debugSession.sendRequest('source', {
+        source: { path: source.path },
         sourceReference: source.sourceReference
       });
       const sourceCode = reply.body.content;