feat: update jest version and adjusted wiki
This commit is contained in:
parent
e80c0e8560
commit
9bc75bba13
|
@ -2,7 +2,8 @@ module.exports = {
|
|||
moduleNameMapper: {
|
||||
'@core/(.*)': '<rootDir>/src/app/core/$1',
|
||||
'@assets/(.*)': '<rootDir>/src/assets/$1',
|
||||
'@shared/(.*)': '<rootDir>/src/shared/$1'
|
||||
'@shared/(.*)': '<rootDir>/src/shared/$1',
|
||||
"^uuid$": "uuid"
|
||||
},
|
||||
preset: 'jest-preset-angular',
|
||||
setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -22,13 +22,13 @@
|
|||
"@angular/platform-browser": "~12.2.16",
|
||||
"@angular/platform-browser-dynamic": "~12.2.16",
|
||||
"@angular/router": "~12.2.16",
|
||||
"@briebug/jest-schematic": "^3.0.0",
|
||||
"@fortawesome/angular-fontawesome": "^0.8.2",
|
||||
"@fortawesome/fontawesome-common-types": "^0.2.36",
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.36",
|
||||
"@fortawesome/free-regular-svg-icons": "^5.15.4",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.15.4",
|
||||
"@nebular/theme": "^9.0.0",
|
||||
"@nebular/eva-icons": "^8.0.0",
|
||||
"@nebular/theme": "^8.0.0",
|
||||
"@ngneat/until-destroy": "~8.0.4",
|
||||
"@ngx-translate/core": "^13.0.0",
|
||||
"@ngx-translate/http-loader": "^6.0.0",
|
||||
|
@ -47,25 +47,22 @@
|
|||
"roboto-fontface": "^0.10.0",
|
||||
"rxjs": "^6.6.7",
|
||||
"tslib": "^2.3.1",
|
||||
"uuid": "^8.3.2",
|
||||
"uuid": "^8.3.1",
|
||||
"zone.js": "~0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-builders/jest": "14.0.0",
|
||||
"@angular-devkit/build-angular": "~12.2.16",
|
||||
"@angular/cli": "~12.2.16",
|
||||
"@angular/cli": "^12.2.16",
|
||||
"@angular/compiler-cli": "~12.2.16",
|
||||
"@babel/preset-typescript": "^7.18.6",
|
||||
"@schematics/angular": "^10.2.4",
|
||||
"@types/jasmine": "~3.6.0",
|
||||
"@types/jasminewd2": "^2.0.10",
|
||||
"@types/jest": "28.1.1",
|
||||
"@types/node": "^12.20.47",
|
||||
"@briebug/jest-schematic": "^3.0.0",
|
||||
"codelyzer": "^6.0.2",
|
||||
"font-awesome": "^4.7.0",
|
||||
"jasmine-core": "~3.6.0",
|
||||
"jasmine-spec-reporter": "~5.0.0",
|
||||
"jest": "28.1.1",
|
||||
"jest-environment-jsdom": "^28.1.1",
|
||||
"protractor": "~7.0.0",
|
||||
"ts-node": "~8.3.0",
|
||||
"tslint": "~6.1.0",
|
||||
|
@ -73,5 +70,8 @@
|
|||
},
|
||||
"resolutions": {
|
||||
"webpack": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"moduleDirectories": [
|
||||
"src"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -30,5 +30,23 @@ Object.defineProperty(document.body.style, 'transform', {
|
|||
},
|
||||
});
|
||||
|
||||
Object.defineProperty(document.body.style, 'transformIgnorePatterns', {
|
||||
value: () => {
|
||||
return {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
Object.defineProperty(document.body.style, 'moduleNameMapper', {
|
||||
value: () => {
|
||||
return {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
/* output shorter and more meaningful Zone error stack traces */
|
||||
// Error.stackTraceLimit = 2;
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
.export-button-container {
|
||||
display: flex;
|
||||
align-content: flex-end;
|
||||
margin-right: 1rem;
|
||||
|
||||
.export-element-icon {
|
||||
}
|
||||
|
|
|
@ -10,6 +10,8 @@ import {HttpClient} from '@angular/common/http';
|
|||
import {RouterTestingModule} from '@angular/router/testing';
|
||||
import {NgxsModule} from '@ngxs/store';
|
||||
import {ProjectState} from '@shared/stores/project-state/project-state';
|
||||
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
||||
import {NbActionsModule, NbIconModule} from '@nebular/theme';
|
||||
|
||||
describe('PentestHeaderComponent', () => {
|
||||
let component: PentestHeaderComponent;
|
||||
|
@ -22,6 +24,9 @@ describe('PentestHeaderComponent', () => {
|
|||
BrowserAnimationsModule,
|
||||
HttpClientTestingModule,
|
||||
ThemeModule.forRoot(),
|
||||
FontAwesomeModule,
|
||||
NbIconModule,
|
||||
NbActionsModule,
|
||||
TranslateModule.forRoot({
|
||||
loader: {
|
||||
provide: TranslateLoader,
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
!function (e, n) { "object" == typeof exports && "undefined" != typeof module ? module.exports = n() : "function" == typeof define && define.amd ? define(n) : e.unfetch = n() }(this, function () { return function (e, n) { return n = n || {}, new Promise(function (t, o) { var r = new XMLHttpRequest, s = [], u = [], i = {}, f = function () { return { ok: 2 == (r.status / 100 | 0), statusText: r.statusText, status: r.status, url: r.responseURL, text: function () { return Promise.resolve(r.responseText) }, json: function () { return Promise.resolve(JSON.parse(r.responseText)) }, blob: function () { return Promise.resolve(new Blob([r.response])) }, clone: f, headers: { keys: function () { return s }, entries: function () { return u }, get: function (e) { return i[e.toLowerCase()] }, has: function (e) { return e.toLowerCase() in i } } } }; for (var a in r.open(n.method || "get", e, !0), r.onload = function () { r.getAllResponseHeaders().replace(/^(.?):[^\S\n]([\s\S]*?)$/gm, function (e, n, t) { s.push(n = n.toLowerCase()), u.push([n, t]), i[n] = i[n] ? i[n] + "," + t : t }), t(f()) }, r.onerror = o, r.withCredentials = "include" == n.credentials, n.headers) r.setRequestHeader(a, n.headers[a]); r.send(n.body || null) }) } }); //# sourceMappingURL=unfetch.umd.js.map
|
|
@ -1,9 +1,5 @@
|
|||
import {DateTimeFormatPipe} from './date-time-format.pipe';
|
||||
import {formatDate, registerLocaleData} from '@angular/common';
|
||||
import localeDe from '@angular/common/locales/de';
|
||||
import {CustomPipe} from 'src/shared/models/custom-pipe.mode';
|
||||
import {User} from '@shared/models/user.model';
|
||||
import {UpdateUserSettings} from '@shared/stores/session-state/session-state.actions';
|
||||
import {NumberAndDateFormatSystem} from '@shared/models/number-and-date-time-format.model';
|
||||
import {SESSION_STATE_NAME, SessionState, SessionStateModel} from '@shared/stores/session-state/session-state';
|
||||
import {NgxsModule, Store} from '@ngxs/store';
|
||||
|
@ -13,6 +9,7 @@ import {HttpClient} from '@angular/common/http';
|
|||
import {HttpLoaderFactory} from '../../app/common-app.module';
|
||||
import {TranslateLoader, TranslateModule} from '@ngx-translate/core';
|
||||
import {HttpClientTestingModule} from '@angular/common/http/testing';
|
||||
import {KeycloakService} from 'keycloak-angular';
|
||||
|
||||
const DESIRED_STORE_STATE_SESSION: SessionStateModel = {
|
||||
userAccount: {
|
||||
|
@ -46,6 +43,7 @@ describe('DateTimeFormatPipe', () => {
|
|||
],
|
||||
providers: [
|
||||
{provide: UserService},
|
||||
{provide: KeycloakService}
|
||||
]
|
||||
}).compileComponents();
|
||||
});
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { NotificationService } from './notification.service';
|
||||
import {NbToastrModule, NbToastrService} from '@nebular/theme';
|
||||
import {TranslateLoader, TranslateModule, TranslateService} from '@ngx-translate/core';
|
||||
import {Observable, of} from 'rxjs';
|
||||
import {HttpClientTestingModule} from '@angular/common/http/testing';
|
||||
|
@ -11,6 +10,7 @@ import {HttpClient} from '@angular/common/http';
|
|||
import {NgxsModule} from '@ngxs/store';
|
||||
import {SessionState} from '../stores/session-state/session-state';
|
||||
import {KeycloakService} from 'keycloak-angular';
|
||||
import {NbToastrModule, NbToastrService} from '@nebular/theme';
|
||||
|
||||
describe('NotificationService', () => {
|
||||
let toastrServiceStub: Partial<NbToastrService>;
|
||||
|
|
|
@ -6,6 +6,7 @@ import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
|||
import {KeycloakService} from 'keycloak-angular';
|
||||
import {Project, ProjectDialogBody} from '@shared/models/project.model';
|
||||
import {environment} from '../../environments/environment';
|
||||
import {throwError} from 'rxjs';
|
||||
|
||||
describe('ProjectService', () => {
|
||||
let service: ProjectService;
|
||||
|
@ -107,7 +108,7 @@ describe('ProjectService', () => {
|
|||
expect(value).toEqual(mockProject);
|
||||
done();
|
||||
},
|
||||
fail);
|
||||
throwError);
|
||||
// assert
|
||||
const req = httpMock.expectOne(`${apiBaseURL}`);
|
||||
expect(req.request.method).toBe('POST');
|
||||
|
@ -130,7 +131,7 @@ describe('ProjectService', () => {
|
|||
expect(value).toEqual(httpResponse.id);
|
||||
done();
|
||||
},
|
||||
fail);
|
||||
throwError);
|
||||
// assert
|
||||
const req = httpMock.expectOne(`${apiBaseURL}/${mockProjectId}`);
|
||||
expect(req.request.method).toBe('DELETE');
|
||||
|
|
|
@ -22,5 +22,9 @@
|
|||
"@shared/*": ["./src/shared/*"],
|
||||
"@assets/*": ["./src/assets/*"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"src/assets/unfetch-polyfill.js"
|
||||
]
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 82 KiB |
Binary file not shown.
Before Width: | Height: | Size: 465 KiB After Width: | Height: | Size: 112 KiB |
Binary file not shown.
Before Width: | Height: | Size: 276 KiB After Width: | Height: | Size: 277 KiB |
Loading…
Reference in New Issue