From d239f27d93812fd90965deeaa88c87fca6552d25 Mon Sep 17 00:00:00 2001 From: Huan LI Date: Sat, 11 May 2019 18:40:24 +0800 Subject: [PATCH] Make comment clear and fix a unit test typo --- src/puppet-config.ts | 6 +++++- src/puppet-manager.spec.ts | 4 ++-- src/puppet-manager.ts | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/puppet-config.ts b/src/puppet-config.ts index 16d64bcf5..56bd6ae4f 100644 --- a/src/puppet-config.ts +++ b/src/puppet-config.ts @@ -6,7 +6,11 @@ export const PUPPET_DEPENDENCIES = { 'mock' : '0.0.0', // compatible with v0.18, will be replaced with wechaty-puppet-padchat 'padchat' : '0.0.0', // compatible with v0.18, will be replaced with wechaty-puppet-padchat 'padpro' : '0.0.0', - ///////////////////////////////////// + + ///////////////////////////////////////////////////////////// + // The Above is Alias for the following full NPM module names + ///////////////////////////////////////////////////////////// + // 'wechaty-puppet-hostie' : '^0.0.1', 'wechaty-puppet-ioscat' : '^0.5.19', // https://www.npmjs.com/package/wechaty-puppet-ioscat 'wechaty-puppet-mock' : '^0.14.1', // https://www.npmjs.com/package/wechaty-puppet-mock diff --git a/src/puppet-manager.spec.ts b/src/puppet-manager.spec.ts index 1c4f9de2f..0d8970944 100755 --- a/src/puppet-manager.spec.ts +++ b/src/puppet-manager.spec.ts @@ -30,14 +30,14 @@ test('resolve an unsupported puppet name', async t => { await PuppetManager.resolve('fasdfsfasfsfdfs' as any) t.fail('should reject') } catch (e) { - t.ok('reject when options is a string') + t.pass('reject when options is a string: ' + e) } try { await PuppetManager.resolve({ puppet: 'fadfdsafa' as any }) t.fail('should reject') } catch (e) { - t.ok('reject when options.puppet is unknown') + t.pass('reject when options.puppet is unknown: ' + e) } try { diff --git a/src/puppet-manager.ts b/src/puppet-manager.ts index bfa1bca9b..6bb5d57f3 100644 --- a/src/puppet-manager.ts +++ b/src/puppet-manager.ts @@ -97,6 +97,7 @@ export class PuppetManager { ].join('\n') ) } + // PuppetName is valid break } -- GitLab