fix(all): fixed TS related errors in spec files
MODIFY
packages/core/src/effects/specs/effects.factory.spec.ts
packages/core/src/effects/specs/effects.factory.spec.ts
@@ -43,7 +43,7 @@ describe('EffectFactory', () => {
expectedError = new Error('Path cannot be empty');
// when
- const effectFactoryFn = () => EffectFactory.matchPath(undefined);
+ const effectFactoryFn = () => EffectFactory.matchPath(undefined as any);
// then
expect(effectFactoryFn).toThrowError(expectedError);
@@ -56,7 +56,7 @@ describe('EffectFactory', () => {
// when
const effectFactoryFn = () => EffectFactory
.matchPath('/')
- .matchType(undefined);
+ .matchType(undefined as any);
// then
expect(effectFactoryFn).toThrowError(expectedError);
@@ -85,7 +85,7 @@ describe('EffectFactory', () => {
const effectFactoryFn = () => EffectFactory
.matchPath('/')
.matchType('GET')
- .use(undefined);
+ .use(undefined as any);
// then
expect(effectFactoryFn).toThrowError(expectedError);

MODIFY
packages/core/src/error/specs/error.model.spec.ts
packages/core/src/error/specs/error.model.spec.ts
@@ -34,7 +34,7 @@ describe('Error model', () => {
});
// when
- Error.prepareStackTrace(error, []);
+ Error.prepareStackTrace!(error, []);
// then
expect(error.name).toBe('CoreError');

MODIFY
packages/core/src/router/specs/urlParams.factory.spec.ts
packages/core/src/router/specs/urlParams.factory.spec.ts
@@ -24,8 +24,8 @@ describe('Url parameters factory', () => {
// then
expect(parameters).toEqual([ 'param1', 'param2' ]);
- expect(match[1]).toEqual('test1');
- expect(match[2]).toEqual('test2');
+ expect(match![1]).toEqual('test1');
+ expect(match![2]).toEqual('test2');
});
test('factorizes path with connected parameters as a one', () => {

MODIFY
packages/spec/api.integration.spec.ts
packages/spec/api.integration.spec.ts
@@ -2,9 +2,17 @@ import * as path from 'path';
import { of, throwError } from 'rxjs';
import { filter, map, mapTo, switchMap } from 'rxjs/operators';
import * as request from 'supertest';
-import { HttpStatus } from '../core/dist/http.interface';
-import { ContentType } from '../core/dist/util/contentType.util';
-import { combineRoutes, Effect, EffectFactory, HttpError, httpListener, HttpRequest, use } from '../core/src';
+import {
+ use,
+ combineRoutes,
+ Effect,
+ EffectFactory,
+ HttpError,
+ HttpStatus,
+ ContentType,
+ httpListener,
+ HttpRequest,
+} from '../core/src';
import { bodyParser$ } from '../middleware-body/src';
import { readFile } from '../util/fileReader.helper';

fix(all): fixed TS related errors in spec files