Procházet zdrojové kódy

Fix test compilation errors.

Jason Grout před 5 roky
rodič
revize
681d7da33d

+ 7 - 0
tests/test-console/src/history.spec.ts

@@ -29,6 +29,7 @@ const mockHistory: KernelMessage.IHistoryReplyMsg = {
   buffers: null,
   channel: 'shell',
   content: {
+    status: 'ok',
     history: [[0, 0, 'foo'], [0, 0, 'bar'], [0, 0, 'baz'], [0, 0, 'qux']]
   }
 };
@@ -116,6 +117,9 @@ describe('console/history', () => {
         const history = new TestHistory({ session });
         history.onHistory(mockHistory);
         const result = await history.back('');
+        if (mockHistory.content.status !== 'ok') {
+          throw new Error('Test history reply is not an "ok" reply');
+        }
         const index = mockHistory.content.history.length - 1;
         const last = (mockHistory.content.history[index] as any)[2];
         expect(result).to.equal(last);
@@ -134,6 +138,9 @@ describe('console/history', () => {
         history.onHistory(mockHistory);
         await Promise.all([history.back(''), history.back('')]);
         const result = await history.forward('');
+        if (mockHistory.content.status !== 'ok') {
+          throw new Error('Test history reply is not an "ok" reply');
+        }
         const index = mockHistory.content.history.length - 1;
         const last = (mockHistory.content.history[index] as any)[2];
         expect(result).to.equal(last);

+ 1 - 0
tests/test-services/src/utils.ts

@@ -59,6 +59,7 @@ export function makeSettings(
 }
 
 const EXAMPLE_KERNEL_INFO: KernelMessage.IInfoReplyMsg['content'] = {
+  status: 'ok',
   protocol_version: '1',
   implementation: 'a',
   implementation_version: '1',