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();
})
});
});
});
}

View File

@ -13,7 +13,7 @@ export function main() {
describe('initialization', () => {
it('should be empty at construction', () => {
const body = new HttpParams();
expect(body.toString()).toEqual('')
expect(body.toString()).toEqual('');
});
it('should parse an existing url', () => {

View File

@ -271,7 +271,7 @@ export function main() {
done();
});
factory.mock.mockFlush(200, 'OK', 'Test');
})
});
});
describe('corrects for quirks', () => {
it('by normalizing 1223 status to 204', (done: DoneFn) => {

View File

@ -64,7 +64,7 @@ export function main() {
});
describe('HttpXsrfCookieExtractor', () => {
let document: {[key: string]: string};
let extractor: HttpXsrfCookieExtractor
let extractor: HttpXsrfCookieExtractor;
beforeEach(() => {
document = {
cookie: 'XSRF-TOKEN=test',