build: enable TSLint on the packages folder (#18459)
porting PRs #18392 and #18441 to 4.x
This commit is contained in:
@ -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();
|
||||
})
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -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', () => {
|
||||
|
@ -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) => {
|
||||
|
@ -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',
|
||||
|
Reference in New Issue
Block a user