You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2018/12/19 16:06:35 UTC

[GitHub] oliversalzburg commented on a change in pull request #485: Ensure test failure on unexpected promise resolution

oliversalzburg commented on a change in pull request #485: Ensure test failure on unexpected promise resolution
URL: https://github.com/apache/cordova-ios/pull/485#discussion_r242975139
 
 

 ##########
 File path: tests/spec/component/versions.spec.js
 ##########
 @@ -25,38 +25,40 @@ if (process.platform === 'darwin') {
     describe('versions', function () {
         describe('get_tool_version method', () => {
             it('should not have found tool by name.', (done) => {
-                versions.get_tool_version('unknown').catch((error) => {
-                    expect(error).toContain('is not valid tool name');
-                    done();
-                });
+                versions.get_tool_version('unknown')
+                    .then(() => done(new Error('expected promise rejection')))
 
 Review comment:
   Didn't know about that syntax. Let me give it a try...

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org