+ cd /testbed
+ git config --global --add safe.directory /testbed
+ cd /testbed
+ git checkout fe332f6e041fa5949a5062cf818f66fc6cb1f0e1 client/lib/post-normalizer/test/index.js
Updated 0 paths from 5e95b19b7c
+ git apply --verbose --reject -
Checking patch client/lib/post-normalizer/test/index.js...
Applied patch client/lib/post-normalizer/test/index.js cleanly.
+ : '>>>>> Start Test Output'
+ ./node_modules/.bin/jest --verbose -c=test/client/jest.config.json client/lib/post-normalizer/test/index.js
FAIL client/lib/post-normalizer/test/index.js
  index
    ✓ should export a function (3ms)
    ✓ should return null if passed null (1ms)
    ✓ should return a copy of what it was passed
    ✓ should leave an empty object alone (1ms)
    ✓ should support async transforms (2ms)
    ✓ should pass along an error if a transform yields one (4ms)
    ✓ should pass along an error if an async transform yields one
    ✓ can decode entities (1ms)
    ✓ can prevent widows (2ms)
    ✓ can prevent widows in empty strings
    ✓ can remove html tags
    makeSiteIDSafeForAPI
      ✓ can make siteIDs into strings
      ✓ can normalized the site_id for the api by replacing :: with /
    safeImageProperties
      ✓ can make image properties safe (5ms)
      ✓ will ignore featured_media that is not of type "image"
    pickPrimaryTag
      ✓ can pick the primary tag by taking the tag with the highest post_count as the primary
      ✓ can pick the primary tag by taking the first tag as primary if there is a tie
    content.disableAutoPlayOnMediaShortcodes
      ✓ should strip autoplay attributes from video (20ms)
      ✓ should strip autoplay attributes from audio (2ms)
    the content normalizer (withContentDOM)
      ✓ should not call nested transforms if content is blank
      ✓ should provide a __contentDOM property to transforms and remove it after (4ms)
    content.removeStyles 
      ✓ can strip style attributes and style elements (17ms)
      ✓ can strip align attributes from non images (2ms)
      ✓ leaves galleries intact (2ms)
      ✓ leaves twitter emdeds intact (3ms)
      ✓ leaves instagram emdeds intact (8ms)
    makeLinksSafe
      ✓ can make links in the post safe (1ms)
    content.makeContentLinksSafe
      ✓ can remove javascript: links (2ms)
      ✓ can remove javascript: links (2ms)
      ✓ can remove javascript: links (1ms)
      ✓ can remove javascript: links (2ms)
      ✓ can remove javascript: links (1ms)
    content.makeImagesSafe
      ✓ can route all images through wp-safe-image if no size specified (2ms)
      ✓ updates images with relative sources to use the post domain (2ms)
      ✓ handles relative images with dot segments (1ms)
      ✓ can route all images through photon if a size is specified (1ms)
      ✓ can remove images that cannot be made safe (1ms)
      ✓ can allow images that cannot be made safe but are from secure hosts (4ms)
      ✓ removes event handlers from content images (1ms)
      ✓ removes srcsets (1ms)
      ✓ removes invalid srcsets (1ms)
    waitForImagesToLoad
      ○ skipped 2 tests
    canonical image picker
      ✓ can pick the canonical image from images (1ms)
      ✓ will pick featured_image if present and images missing (1ms)
      ✓ will pick post_thumbnail over featured_image if present and images missing
    keepValidImages
      ✓ should filter post.images based on size (3ms)
    content.makeEmbedsSafe
      ✓ makes iframes safe, rewriting to ssl and sandboxing (7ms)
      ✓ allows trusted sources to be unsandboxed (1ms)
      ✓ applies the right level of sandboxing to whitelisted sources (2ms)
      ✓ removes iframes with an empty src (2ms)
      ✓ removes objects from external posts (3ms)
      ✓ removes embeds from external posts (1ms)
    content.detectMedia
      ✓ detects whitelisted iframes (7ms)
      ✓ detects images intermixed with embeds and in the correct order (6ms)
      ✓ detects images (2ms)
      ✓ detects trusted iframes (2ms)
      ✓ detects youtube embed (3ms)
      ✓ detects vimeo embed (2ms)
      ✓ empty content yields undefined
      ✓ content with no embeds yields an empty array (1ms)
      ✓ ignores embeds from non-whitelisted providers (4ms)
      ✓ links to embedded Polldaddy polls (7ms)
      ✕ links to embedded Polldaddy surveys (56ms)
      ✓ removes elements by selector (16ms)
    The fancy excerpt creator
      ✓ strips empty elements, leading brs, and styling attributes (12ms)
      ✓ strips leading brs even if they are nested (2ms)
      ✓ strips multiple leading brs even if nested (3ms)
      ✓ only trims break if there is no preceding text (1ms)
      ✓ limits the excerpt to 3 elements (3ms)
      ✓ limits the excerpt to 3 elements after trimming (7ms)
      ✓ removes style tags (2ms)
      ✓ builds the content without html (2ms)
    Jetpack Carousel Linker
      ✓ should fix links to jetpack carousels (7ms)

  ● index › content.detectMedia › links to embedded Polldaddy surveys

    TypeError: Cannot read property 'content' of undefined

      1104 | 				function( err, normalized ) {
      1105 | 					assert.include(
    > 1106 | 						normalized.content,
           | 						           ^
      1107 | 						'<p><a target="_blank" rel="external noopener noreferrer" href="https://bluefuton.polldaddy.com/s/what-s-your-favourite-bird">Take our survey</a></p>'
      1108 | 					);
      1109 | 					done( err );

      at client/lib/post-normalizer/test/index.js:1106:18
      at _callee$ (client/lib/post-normalizer/index.js:47:4)
      at tryCatch (node_modules/regenerator-runtime/runtime.js:62:40)
      at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:296:22)
      at Generator.prototype.(anonymous function) [as throw] (node_modules/regenerator-runtime/runtime.js:114:21)
      at asyncGeneratorStep (node_modules/@babel/runtime/helpers/asyncToGenerator.js:5:24)
      at _throw (node_modules/@babel/runtime/helpers/asyncToGenerator.js:31:9)

Test Suites: 1 failed, 1 total
Tests:       1 failed, 2 skipped, 71 passed, 74 total
Snapshots:   0 total
Time:        4.453s
Ran all test suites matching /client\/lib\/post-normalizer\/test\/index.js/i.
+ : '>>>>> End Test Output'
+ git checkout fe332f6e041fa5949a5062cf818f66fc6cb1f0e1 client/lib/post-normalizer/test/index.js
Updated 1 path from 5e95b19b7c
