build: enable TSLint on the packages folder (#18459)

porting PRs #18392 and #18441 to 4.x
This commit is contained in:
Victor Berchet
2017-08-02 15:23:33 -07:00
committed by GitHub
parent 24db1ed938
commit baf4ce0dd0
48 changed files with 133 additions and 112 deletions

View File

@ -56,11 +56,11 @@ export function main() {
});
describe('throws an error', () => {
it('when request method is not JSONP',
() => {expect(() => backend.handle(SAMPLE_REQ.clone<never>({method: 'GET'})))
.toThrowError(JSONP_ERR_WRONG_METHOD)});
() => expect(() => backend.handle(SAMPLE_REQ.clone<never>({method: 'GET'})))
.toThrowError(JSONP_ERR_WRONG_METHOD));
it('when response type is not json',
() => {expect(() => backend.handle(SAMPLE_REQ.clone<never>({responseType: 'text'})))
.toThrowError(JSONP_ERR_WRONG_RESPONSE_TYPE)});
() => expect(() => backend.handle(SAMPLE_REQ.clone<never>({responseType: 'text'})))
.toThrowError(JSONP_ERR_WRONG_RESPONSE_TYPE));
it('when callback is never called', (done: DoneFn) => {
backend.handle(SAMPLE_REQ).subscribe(undefined, (err: HttpErrorResponse) => {
expect(err.status).toBe(0);
@ -69,7 +69,7 @@ export function main() {
done();
});
document.mockLoad();
})
});
});
});
}