git.delta.rocks / unique-network / refs/commits / 2469ee725ca5

difftreelog

correct and enable tests/scripts/readyness.js

Konstantin Astakhov2022-09-06parent: #c37bc7e.patch.diff
in: master

3 files changed

deleted.github/workflows/autogen-js-types.ymldiffbeforeafterboth

no changes

modified.github/workflows/dev-build-tests.ymldiffbeforeafterboth
--- a/.github/workflows/dev-build-tests.yml
+++ b/.github/workflows/dev-build-tests.yml
@@ -96,10 +96,12 @@
           node-version: 16
 
       - name: Run tests
+        working-directory: tests
         run: |
-          cd tests
           yarn install
           yarn add mochawesome
+          yarn polkadot-types
+          
           echo "Ready to start tests"
           node scripts/readyness.js
           NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}
modifiedtests/scripts/readyness.jsdiffbeforeafterboth
--- a/tests/scripts/readyness.js
+++ b/tests/scripts/readyness.js
@@ -6,9 +6,9 @@
   await api.isReadyOrError;
 
   const head = (await api.rpc.chain.getHeader()).number.toNumber();
+  await api.disconnect();
   if(head < 1) throw Error('No block #1');
 
-  await api.disconnect();
 }
 
 const sleep = time => {