hunk.code_window:     this.timeout(10000);
       it('Inline mage', function(done) {
           assert.equal(
               Markdown.format('![Mattermost](/images/icon.png)').trim(),
               '<p><img src="/images/icon.png" alt="Mattermost" onload="window.markdownImageLoaded(this)" onerror="window.markdownImageLoaded(this)" class="markdown-inline-img" crossorigin="anonymous"></p>'
           );
           done();
       });
  
hunk.labels: keep keep keep keep keep replace keep keep keep keep keep
hunk.after_edit:             '<p><img src="/images/icon.png" alt="Mattermost" onload="window.markdownImageLoaded(this)" onerror="window.markdownImageLoaded(this)" class="markdown-inline-img"></p>'
  
hunk.file_path: webapp/tests/formatting_imgs.test.jsx
hunk.type: replace
file: package acme
  
  import (
  	"fmt"
  	"time"
  )
  
  // WaitFor polls the given function 'f', once every 'interval', up to 'timeout'.
  func WaitFor(timeout, interval time.Duration, f func() (bool, error)) error {
  	var lastErr string
  	timeup := time.After(timeout)
  	for {
  		select {
  		case <-timeup:
  			return fmt.Errorf("Time limit exceeded. Last error: %s", lastErr)
  		default:
  		}
  
  		stop, err := f()
  		if stop {
  			return nil
  		}
  		if err != nil {
  			lastErr = err.Error()
  		}
  
  		time.Sleep(interval)
  	}
  }
  