diff --git a/ngx-tools/src/jwt-token-managment/effects.spec.ts b/ngx-tools/src/jwt-token-managment/effects.spec.ts index 752f9c14..cedaf460 100644 --- a/ngx-tools/src/jwt-token-managment/effects.spec.ts +++ b/ngx-tools/src/jwt-token-managment/effects.spec.ts @@ -96,6 +96,7 @@ describe(`JWT Token Effects`, function() { }; test(`should provide a cookie and store cookie message if the cookie is set`, () => { + // tslint:disable-next-line deprecation const currentState = of(blankState); mockCookieService.get.mockReturnValue('abcd'); @@ -114,6 +115,7 @@ describe(`JWT Token Effects`, function() { }); test(`should emit nothing if state is loaded`, () => { + // tslint:disable-next-line deprecation const currentState = of({ ...blankState, jwtTokens: { @@ -131,6 +133,7 @@ describe(`JWT Token Effects`, function() { }); test(`should emit nothing if state is empty`, () => { + // tslint:disable-next-line deprecation const currentState = of({ ...blankState, jwtTokens: { @@ -149,6 +152,7 @@ describe(`JWT Token Effects`, function() { }); it(`it should only announce the initial if the cookie is empty`, () => { + // tslint:disable-next-line deprecation const currentState = of(blankState); mockCookieService.get.mockReturnValue(''); diff --git a/ngx-tools/src/jwt-token-managment/utilities/token-escalator.spec.ts b/ngx-tools/src/jwt-token-managment/utilities/token-escalator.spec.ts index b417b1ac..313e68d1 100644 --- a/ngx-tools/src/jwt-token-managment/utilities/token-escalator.spec.ts +++ b/ngx-tools/src/jwt-token-managment/utilities/token-escalator.spec.ts @@ -25,6 +25,7 @@ describe(`TokenEscalator`, function() { let escalator: TokenEscalator; let actions: Observable; const tokenName = 'foo'; + // tslint:disable-next-line deprecation const authorizeUrl = of('/foobar'); beforeEach(() => { @@ -56,7 +57,9 @@ describe(`TokenEscalator`, function() { test(`should dispatch success on a successful response`, () => { actions = cold('a', {a: new JwtActions.EscalateToken(tokenName)}); const responseBody = {token: 'asdfkjlslfd'}; + // tslint:disable-next-line deprecation mockHttp.get.mockReturnValue(of(responseBody)); + // tslint:disable-next-line deprecation mockStore.select.mockReturnValue(of('currentToken')); ( @@ -74,7 +77,9 @@ describe(`TokenEscalator`, function() { test(`should dispatch failed if the token fails to extract`, () => { actions = cold('a', {a: new JwtActions.EscalateToken(tokenName)}); const responseBody = {}; + // tslint:disable-next-line deprecation mockHttp.get.mockReturnValue(of(responseBody)); + // tslint:disable-next-line deprecation mockStore.select.mockReturnValue(of('currentToken')); ( diff --git a/ngx-tools/src/retry-with-backoff/retry-with-backoff.spec.ts b/ngx-tools/src/retry-with-backoff/retry-with-backoff.spec.ts index 721e3ce9..a39b6cab 100644 --- a/ngx-tools/src/retry-with-backoff/retry-with-backoff.spec.ts +++ b/ngx-tools/src/retry-with-backoff/retry-with-backoff.spec.ts @@ -14,6 +14,7 @@ describe(`retryWithBackoff`, function() { const error = new Error('bar'); const seenValues: {[idx: number]: number} = {}; + // tslint:disable-next-line deprecation of(1, 2, 3).pipe( tap(v => { if (!seenValues[v]) { @@ -33,6 +34,7 @@ describe(`retryWithBackoff`, function() { retries: 2, delayCalculator: linearBackoff, }), + // tslint:disable-next-line no-any ).subscribe(() => {}, (err: any) => { expect(err).toEqual(error); expect(seenValues).toEqual({ @@ -48,6 +50,7 @@ describe(`retryWithBackoff`, function() { const error = new Error('bar'); const seenValues: {[idx: number]: number} = {}; + // tslint:disable-next-line deprecation of(1, 2, 3, 4).pipe( tap(v => { if (!seenValues[v]) { diff --git a/ngx-tools/src/uuid/uuid.spec.ts b/ngx-tools/src/uuid/uuid.spec.ts index e4b98d9c..e48d1bc5 100644 --- a/ngx-tools/src/uuid/uuid.spec.ts +++ b/ngx-tools/src/uuid/uuid.spec.ts @@ -14,7 +14,7 @@ describe(`uuid`, function() { // Test Validity if (!uuidRegex.test(newUuid)) { - done.fail(new Error('This is the error')); + done.fail(new Error(`Not a valid UUID: ${newUuid}`)); } // Test Collision diff --git a/ngx-tools/testing/src/utilities/event-objects.spec.ts b/ngx-tools/testing/src/utilities/event-objects.spec.ts index 71e38f9e..8a0ea40d 100644 --- a/ngx-tools/testing/src/utilities/event-objects.spec.ts +++ b/ngx-tools/testing/src/utilities/event-objects.spec.ts @@ -50,7 +50,6 @@ describe(`event-objects`, function() { const actual: KeyboardEvent = createKeyboardEvent('keydown', KEYS.ENTER, target); expect(actual.code).toEqual(KEYS.ENTER.code); expect(actual.key).toEqual(KEYS.ENTER.code); - expect(actual.keyCode).toEqual(KEYS.ENTER.keyCode); expect(actual.target).toEqual(target); }); diff --git a/ngx-tools/testing/src/utilities/event-objects.ts b/ngx-tools/testing/src/utilities/event-objects.ts index 460bdc34..6071c61b 100644 --- a/ngx-tools/testing/src/utilities/event-objects.ts +++ b/ngx-tools/testing/src/utilities/event-objects.ts @@ -96,7 +96,6 @@ export function createKeyboardEvent( // Webkit Browsers don't set the keyCode when calling the init function. // See related bug https://bugs.webkit.org/show_bug.cgi?id=16735 Object.defineProperties(event, { - keyCode: {get: () => key.keyCode}, key: {get: () => key.code}, target: {get: () => target}, code: {get: () => key.code},