All files / botbuilder-unit/spec/scripts/attachments validateAttachmentWithFunction_2.js

100% Statements 3/3
80% Branches 4/5
100% Functions 1/1
100% Lines 3/3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 201x                   1x     1x            
module.exports = [
  {user: 'hi'},
  {bot: 'Hello'},
  {
    "bot": "World!",
    "attachmentLayout": 'carousel',
    "attachments": [
      {
        "contentType": "application/vnd.microsoft.card.hero",
        "content": function (value) {
          let result = ((value.title == 'My Title')
          && (value.subtitle == 'My Subtitle')
          && (value.images.length == 2));
          return result ? Promise.resolve() : Promise.reject();
        }
      }
    ]
  },
  {endConversation: true}
]