message: Failing test for when fetch is passed Request obj instead of url string
diff: @@ -631,7 +631,52 @@ describe('integration', function () {
  },
  function () {
  var Raven = iframe.contentWindow.Raven,
  - breadcrumbs = Raven._breadcrumbs;
  + breadcrumbs = Raven._breadcrumbs,
  + breadcrumbUrl = '/test/integration/example.json';
  +
  + if ('fetch' in window) {
  + assert.equal(breadcrumbs.length, 1);
  +
  + assert.equal(breadcrumbs[0].type, 'http');
  + assert.equal(breadcrumbs[0].category, 'fetch');
  + assert.equal(breadcrumbs[0].data.method, 'GET');
  + assert.equal(breadcrumbs[0].data.url, breadcrumbUrl);
  + } else {
  + // otherwise we use a fetch polyfill based on xhr
  + assert.equal(breadcrumbs.length, 2);
  +
  + assert.equal(breadcrumbs[0].type, 'http');
  + assert.equal(breadcrumbs[0].category, 'fetch');
  + assert.equal(breadcrumbs[0].data.method, 'GET');
  + assert.equal(breadcrumbs[0].data.url, breadcrumbUrl);
  +
  + assert.equal(breadcrumbs[1].type, 'http');
  + assert.equal(breadcrumbs[1].category, 'xhr');
  + assert.equal(breadcrumbs[1].data.method, 'GET');
  + assert.equal(breadcrumbs[1].data.url, breadcrumbUrl);
  + }
  + }
  + );
  + });
  +
  + it('should record a fetch request with Request obj instead of URL string', function (done) {
  + var iframe = this.iframe;
  +
  + iframeExecute(iframe, done,
  + function () {
  + // some browsers trigger onpopstate for load / reset breadcrumb state
  + Raven._breadcrumbs = [];
  +
  + fetch(new Request('/test/integration/example.json')).then(function () {
  + setTimeout(done);
  + }, function () {
  + setTimeout(done);
  + });
  + },
  + function () {
  + var Raven = iframe.contentWindow.Raven,
  + breadcrumbs = Raven._breadcrumbs,
  + breadcrumbUrl = '/test/integration/example.json';
  if ('fetch' in window) {
  assert.equal(breadcrumbs.length, 1);
  @@ -639,6 +684,8 @@ describe('integration', function () {
  assert.equal(breadcrumbs[0].type, 'http');
  assert.equal(breadcrumbs[0].category, 'fetch');
  assert.equal(breadcrumbs[0].data.method, 'GET');
  + // Request constructor normalizes the url
  + assert.ok(breadcrumbs[0].data.url.indexOf(breadcrumbUrl) !== -1);
  } else {
  // otherwise we use a fetch polyfill based on xhr
  assert.equal(breadcrumbs.length, 2);
  @@ -646,10 +693,12 @@ describe('integration', function () {
  assert.equal(breadcrumbs[0].type, 'http');
  assert.equal(breadcrumbs[0].category, 'fetch');
  assert.equal(breadcrumbs[0].data.method, 'GET');
  + assert.ok(breadcrumbs[0].data.url.indexOf(breadcrumbUrl) !== -1);
  assert.equal(breadcrumbs[1].type, 'http');
  assert.equal(breadcrumbs[1].category, 'xhr');
  assert.equal(breadcrumbs[1].data.method, 'GET');
  + assert.ok(breadcrumbs[1].data.url.indexOf(breadcrumbUrl) !== -1);
  }
  }
  );
  