Closed hunterlester closed 5 years ago
I'm seeing some tests failing with node 10 on OSX. (though not many).
As this update facilitates 10, can you see how node 10 goers for you on windows, @hunterlester ? If we can have compat for node 8/9/10, that would be rad.
errors I'm seeing are purely related to node error wording being throw, which I guess has changed in node 10:
1) Smoke test is rejected if options object contains non-string configPath value:
AssertionError: expected [Promise] to be rejected with a message matching 'Failed to set additional config search path. Reason: TypeError: error setting argument 0 - "string" must be a string, Buffer, or ArrayBuffer', but got 'Failed to set additional config search path. Reason: TypeError [ERR_INVALID_ARG_TYPE]: error setting argument 0 - The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type object'
at next$onError (node_modules/should/cjs/should.js:1696:12)
2) Encryption keys two app encryption throws error if decryptSealed not provided with cipher:
AssertionError: expected [Promise] to be rejected with a message matching 'First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.', but got 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type undefined'
at next$onError (node_modules/should/cjs/should.js:1696:12)
3) NFS emulation throws error if invalid user metadata type is passed while updating file:
AssertionError: expected Function { name: 'test' } to throw exception with a message matching 'First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.', but got 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type object'
at Assertion.fail (node_modules/should/cjs/should.js:258:17)
at Assertion.value (node_modules/should/cjs/should.js:335:19)
at Context.it (test/nfs.js:249:30)
4) NFS emulation throws error if invalid user metadata type is passed while inserting file:
AssertionError: expected Function { name: 'test' } to throw exception with a message matching '"value" argument must not be a number', but got 'The "value" argument must not be of type number. Received type number'
I've setup a PR https://github.com/hunterlester/safe_app_nodejs/pull/2 updating the test regex, which is failing as it differs between node versions.
The purpose of this is to be able to upgrade to Electron v4.0.0 in SAFE Browser
Resolves #305