From 766910c206cc0a8016b3651e14d75b4a1f6d224f Mon Sep 17 00:00:00 2001 From: David Halls Date: Wed, 27 Oct 2021 23:26:50 +0100 Subject: [PATCH] GHA: Try strict unhandle promise handling --- .github/workflows/ci.yml | 3 --- test/jose_interop_vows.py | 5 +---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c0edd3..bdebd71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,9 +23,6 @@ jobs: - name: Use Node ${{ matrix.node-version }} uses: actions/setup-node@v2 - - name: Test Node exit status - run: node -e 'throw new Error("foo")' || echo $? - - name: Install requirements run: | pip install -r requirements.txt diff --git a/test/jose_interop_vows.py b/test/jose_interop_vows.py index 78c8edc..c00e596 100644 --- a/test/jose_interop_vows.py +++ b/test/jose_interop_vows.py @@ -15,14 +15,11 @@ def spawn(cmd, parse_json): """ run node command """ #pylint: disable=E1101 with lock: - p = Popen(["node", "-e", "fixtures=require('./test/fixtures');" + cmd], #pylint: disable=consider-using-with + p = Popen(["node", "--unhandled-rejections=strict", "-e", "fixtures=require('./test/fixtures');" + cmd], #pylint: disable=consider-using-with stdout=PIPE, stderr=PIPE) (stdout, stderr) = p.communicate() stdout = stdout.decode('utf-8') stderr = stderr.decode('utf-8') - print("stdout: %s" % stdout) - print("stderr: %s" % stderr) - print("returncode: %d" % p.returncode) if p.returncode == 0: return json_decode(stdout) if parse_json else stdout raise Exception(stderr if stderr else ('exited with {}'.format(p.returncode)))