Parcourir la source

Await sleeps.

Ian Rose il y a 6 ans
Parent
commit
e96ecb38a0
1 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 4 4
      tests/test-notebook/src/actions.spec.ts

+ 4 - 4
tests/test-notebook/src/actions.spec.ts

@@ -552,7 +552,7 @@ describe('@jupyterlab/notebook', () => {
         // Markdown rendering is asynchronous, but the cell
         // provides no way to hook into that. Sleep here
         // to make sure it finishes.
-        sleep(100);
+        await sleep(100);
         expect(result).to.equal(false);
         expect(child.rendered).to.equal(true);
         await ipySession.kernel.restart();
@@ -641,7 +641,7 @@ describe('@jupyterlab/notebook', () => {
         // Markdown rendering is asynchronous, but the cell
         // provides no way to hook into that. Sleep here
         // to make sure it finishes.
-        sleep(100);
+        await sleep(100);
         expect(result).to.equal(false);
         expect(cell.rendered).to.equal(true);
         expect(widget.activeCellIndex).to.equal(2);
@@ -719,7 +719,7 @@ describe('@jupyterlab/notebook', () => {
         // Markdown rendering is asynchronous, but the cell
         // provides no way to hook into that. Sleep here
         // to make sure it finishes.
-        sleep(100);
+        await sleep(100);
         expect(result).to.equal(false);
         expect(cell.rendered).to.equal(true);
         expect(widget.activeCellIndex).to.equal(2);
@@ -789,7 +789,7 @@ describe('@jupyterlab/notebook', () => {
         // Markdown rendering is asynchronous, but the cell
         // provides no way to hook into that. Sleep here
         // to make sure it finishes.
-        sleep(100);
+        await sleep(100);
         expect(result).to.equal(false);
         expect(cell.rendered).to.equal(true);
         await ipySession.kernel.restart();