Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jridgewell committed May 30, 2017
1 parent ee0b983 commit 2f83963
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion extensions/amp-analytics/0.1/test/test-amp-analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ describe('amp-analytics', function() {
}
return Promise.resolve({
json() {
return Promise.resolve(SON.parse(jsonMockResponses[url]));
return Promise.resolve(JSON.parse(jsonMockResponses[url]));
},
});
}};
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-auto-ads/0.1/amp-auto-ads.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class AmpAutoAds extends AMP.BaseElement {
};
return xhrFor(this.win)
.fetchJson(configUrl, xhrInit)
.then(res => res.json());
.then(res => res.json())
.catch(reason => {
user().error(TAG, 'amp-auto-ads config xhr failed: ' + reason);
return null;
Expand Down
4 changes: 2 additions & 2 deletions extensions/amp-list/0.1/test/test-amp-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ describe('amp-list component', () => {
json() {
return Promise.resolve({});
},
});.once();
})).once();
templatesMock.expects('findAndRenderTemplateArray').never();
return expect(list.layoutCallback()).to.eventually.be
.rejectedWith(/Response must contain an array/);
Expand All @@ -170,7 +170,7 @@ describe('amp-list component', () => {
json() {
return Promise.resolve({different});
},
});.once();
})).once();
templatesMock.expects('findAndRenderTemplateArray')
.withExactArgs(element, different)
.returns(Promise.resolve([itemElement])).once();
Expand Down
3 changes: 2 additions & 1 deletion extensions/amp-share-tracking/0.1/amp-share-tracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ export class AmpShareTracking extends AMP.BaseElement {
'have a fragment value.');
return '';
}, err => {
user().error(TAG, 'The request to share-tracking endpoint failed:' + err);
user().error(TAG, 'The request to share-tracking endpoint failed:',
err);
return '';
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ describes.fakeWin('amp-share-tracking', {
status: 404,
json() {
return Promise.reject('404 bad json');
}
},
}));
const ampShareTracking = getAmpShareTracking('http://foo.bar');
return shareTrackingForOrNull(ampShareTracking.win).then(fragments => {
Expand Down
6 changes: 3 additions & 3 deletions test/functional/test-impression.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('impression', () => {
sandbox.stub(viewer, 'getParam');
xhr = xhrFor(window);
expect(xhr.fetchJson).to.be.defined;
sandbox.stub(xhr, 'fetchJson' () => {
sandbox.stub(xhr, 'fetchJson', () => {
return Promise.resolve({
json() {
return Promise.resolve(null);
Expand Down Expand Up @@ -101,7 +101,7 @@ describe('impression', () => {
return Promise.resolve({
'location': 'test_location?gclid=654321',
});
}
},
});
}, 5000);
}));
Expand All @@ -125,7 +125,7 @@ describe('impression', () => {
resolve({
json() {
return Promise.resolve(null);
}
},
});
}, 10000);
}));
Expand Down

0 comments on commit 2f83963

Please sign in to comment.