Update to latest crypto-ld and jsigs api. by dmitrizagidulin · Pull Request #83 · digitalbazaar/vc (original) (raw)
it looks like this has lint issues causing the test suite to fail.
EDIT: actually it looks like tests are failing in this branch.
my local test-node
result:
verify API (presentations) 1) verifies a valid signed presentation 2) verifies an unsigned presentation
tests for multiple credentials 3) cause error when credentials are tampered 4) should not cause error when credentials are correct 5) cause error when credentials are tampered 6) should not cause error when credentials are correct 7) cause error when credentials are tampered 8) should not cause error when credentials are correct 9) cause error when credentials are tampered 10) should not cause error when credentials are correct
18 passing (2s) 10 failing
verify API (presentations) verifies a valid signed presentation: VerificationError: Verification error(s). at Object.verify (node_modules/jsonld-signatures/lib/jsonld-signatures.js:124:22)
at _verifyPresentation (lib/vc.js:436:30)
at Context. (tests/10-verify.spec.js:319:20)verify API (presentations) verifies an unsigned presentation:
AssertionError: expected false to be true
- expected - actual
-false +true
at Context. (tests/10-verify.spec.js:350:31)
tests for multiple credentials cause error when credentials are tampered:
AssertionError: expected false to be true
- expected - actual
-false +true
at Context. (tests/10-verify.spec.js:396:39)
tests for multiple credentials should not cause error when credentials are correct:
AssertionError: expected false to be true
- expected - actual
-false +true
at Context. (tests/10-verify.spec.js:419:33)
tests for multiple credentials cause error when credentials are tampered:
AssertionError: expected false to be true
- expected - actual
-false +true
at Context. (tests/10-verify.spec.js:396:39)
at processTicksAndRejections (internal/process/task_queues.js:93:5)tests for multiple credentials should not cause error when credentials are correct:
AssertionError: expected false to be true
- expected - actual
-false +true
at Context. (tests/10-verify.spec.js:419:33)
at processTicksAndRejections (internal/process/task_queues.js:93:5)tests for multiple credentials cause error when credentials are tampered:
AssertionError: expected false to be true
- expected - actual
-false +true
at Context. (tests/10-verify.spec.js:396:39)
at processTicksAndRejections (internal/process/task_queues.js:93:5)tests for multiple credentials should not cause error when credentials are correct:
AssertionError: expected false to be true
- expected - actual
-false +true
at Context. (tests/10-verify.spec.js:419:33)
at processTicksAndRejections (internal/process/task_queues.js:93:5)tests for multiple credentials cause error when credentials are tampered:
AssertionError: expected false to be true
- expected - actual
-false +true
at Context. (tests/10-verify.spec.js:396:39)
at processTicksAndRejections (internal/process/task_queues.js:93:5)tests for multiple credentials should not cause error when credentials are correct:
AssertionError: expected false to be true
- expected - actual
-false +true
at Context. (tests/10-verify.spec.js:419:33)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
and with the test suites in
npm test
> vc-js@0.6.5-0 test /home/liminal18/Programs/nodeJS/digital_bazaar/vc-js
> bin/vc-test
evidence (cardinality) ... FAIL
evidence (objects) ... FAIL
evidence (url invalid) ... ok
evidence ... FAIL
issued (cardinality invalid) ... ok
issued (invalid) ... ok
issued (date invalid) ... ok
issued ... FAIL
issuer (cardinality invalid) ... ok
issuer (uri invalid) ... ok
issuer (object id) ... FAIL
issuer ... FAIL
minimal ... FAIL
revocation (type invalid) ... ok
revocation (url invalid) ... ok
revocation ... FAIL
======================================================================
FAIL: evidence (cardinality)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/../test-suites/vc-test-suite/bin/vc-driver", line 106, in runTest
self.assertEqual(issued.returncode, 0, {
AssertionError: 1 != 0 : {'message': 'bad return code', 'stdout': b'', 'stderr': b'/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138\nconst testSuite = new jsigs.suites.Ed25519Signature2018({\n ^\n\nTypeError: jsigs.suites.Ed25519Signature2018 is not a constructor\n at Object.<anonymous> (/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138:19)\n at Module._compile (internal/modules/cjs/loader.js:1063:30)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)\n at Module.load (internal/modules/cjs/loader.js:928:32)\n at Function.Module._load (internal/modules/cjs/loader.js:769:14)\n at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)\n at internal/main/run_main_module.js:17:47\n'}
======================================================================
FAIL: evidence (objects)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/../test-suites/vc-test-suite/bin/vc-driver", line 106, in runTest
self.assertEqual(issued.returncode, 0, {
AssertionError: 1 != 0 : {'message': 'bad return code', 'stdout': b'', 'stderr': b'/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138\nconst testSuite = new jsigs.suites.Ed25519Signature2018({\n ^\n\nTypeError: jsigs.suites.Ed25519Signature2018 is not a constructor\n at Object.<anonymous> (/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138:19)\n at Module._compile (internal/modules/cjs/loader.js:1063:30)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)\n at Module.load (internal/modules/cjs/loader.js:928:32)\n at Function.Module._load (internal/modules/cjs/loader.js:769:14)\n at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)\n at internal/main/run_main_module.js:17:47\n'}
======================================================================
FAIL: evidence
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/../test-suites/vc-test-suite/bin/vc-driver", line 106, in runTest
self.assertEqual(issued.returncode, 0, {
AssertionError: 1 != 0 : {'message': 'bad return code', 'stdout': b'', 'stderr': b'/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138\nconst testSuite = new jsigs.suites.Ed25519Signature2018({\n ^\n\nTypeError: jsigs.suites.Ed25519Signature2018 is not a constructor\n at Object.<anonymous> (/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138:19)\n at Module._compile (internal/modules/cjs/loader.js:1063:30)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)\n at Module.load (internal/modules/cjs/loader.js:928:32)\n at Function.Module._load (internal/modules/cjs/loader.js:769:14)\n at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)\n at internal/main/run_main_module.js:17:47\n'}
======================================================================
FAIL: issued
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/../test-suites/vc-test-suite/bin/vc-driver", line 106, in runTest
self.assertEqual(issued.returncode, 0, {
AssertionError: 1 != 0 : {'message': 'bad return code', 'stdout': b'', 'stderr': b'/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138\nconst testSuite = new jsigs.suites.Ed25519Signature2018({\n ^\n\nTypeError: jsigs.suites.Ed25519Signature2018 is not a constructor\n at Object.<anonymous> (/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138:19)\n at Module._compile (internal/modules/cjs/loader.js:1063:30)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)\n at Module.load (internal/modules/cjs/loader.js:928:32)\n at Function.Module._load (internal/modules/cjs/loader.js:769:14)\n at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)\n at internal/main/run_main_module.js:17:47\n'}
======================================================================
FAIL: issuer (object id)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/../test-suites/vc-test-suite/bin/vc-driver", line 106, in runTest
self.assertEqual(issued.returncode, 0, {
AssertionError: 1 != 0 : {'message': 'bad return code', 'stdout': b'', 'stderr': b'/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138\nconst testSuite = new jsigs.suites.Ed25519Signature2018({\n ^\n\nTypeError: jsigs.suites.Ed25519Signature2018 is not a constructor\n at Object.<anonymous> (/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138:19)\n at Module._compile (internal/modules/cjs/loader.js:1063:30)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)\n at Module.load (internal/modules/cjs/loader.js:928:32)\n at Function.Module._load (internal/modules/cjs/loader.js:769:14)\n at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)\n at internal/main/run_main_module.js:17:47\n'}
======================================================================
FAIL: issuer
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/../test-suites/vc-test-suite/bin/vc-driver", line 106, in runTest
self.assertEqual(issued.returncode, 0, {
AssertionError: 1 != 0 : {'message': 'bad return code', 'stdout': b'', 'stderr': b'/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138\nconst testSuite = new jsigs.suites.Ed25519Signature2018({\n ^\n\nTypeError: jsigs.suites.Ed25519Signature2018 is not a constructor\n at Object.<anonymous> (/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138:19)\n at Module._compile (internal/modules/cjs/loader.js:1063:30)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)\n at Module.load (internal/modules/cjs/loader.js:928:32)\n at Function.Module._load (internal/modules/cjs/loader.js:769:14)\n at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)\n at internal/main/run_main_module.js:17:47\n'}
======================================================================
FAIL: minimal
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/../test-suites/vc-test-suite/bin/vc-driver", line 106, in runTest
self.assertEqual(issued.returncode, 0, {
AssertionError: 1 != 0 : {'message': 'bad return code', 'stdout': b'', 'stderr': b'/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138\nconst testSuite = new jsigs.suites.Ed25519Signature2018({\n ^\n\nTypeError: jsigs.suites.Ed25519Signature2018 is not a constructor\n at Object.<anonymous> (/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138:19)\n at Module._compile (internal/modules/cjs/loader.js:1063:30)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)\n at Module.load (internal/modules/cjs/loader.js:928:32)\n at Function.Module._load (internal/modules/cjs/loader.js:769:14)\n at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)\n at internal/main/run_main_module.js:17:47\n'}
======================================================================
FAIL: revocation
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/../test-suites/vc-test-suite/bin/vc-driver", line 106, in runTest
self.assertEqual(issued.returncode, 0, {
AssertionError: 1 != 0 : {'message': 'bad return code', 'stdout': b'', 'stderr': b'/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138\nconst testSuite = new jsigs.suites.Ed25519Signature2018({\n ^\n\nTypeError: jsigs.suites.Ed25519Signature2018 is not a constructor\n at Object.<anonymous> (/home/liminal18/Programs/nodeJS/digital_bazaar/vc-js/bin/vc-js:138:19)\n at Module._compile (internal/modules/cjs/loader.js:1063:30)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)\n at Module.load (internal/modules/cjs/loader.js:928:32)\n at Function.Module._load (internal/modules/cjs/loader.js:769:14)\n at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)\n at internal/main/run_main_module.js:17:47\n'}
----------------------------------------------------------------------
Ran 16 tests in 7.091s
FAILED (failures=8)