Skip to content
Snippets Groups Projects
Commit a1682574 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-6302 fix test

parent 98e2123e
Branches
Tags
No related merge requests found
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
'jest-preset-angular/build/serializers/html-comment', 'jest-preset-angular/build/serializers/html-comment',
], ],
transform: { transform: {
'^.+\\.(ts|mjs|js|html)$': [ '^.+.(ts|mjs|js|html)$': [
'jest-preset-angular', 'jest-preset-angular',
{ {
tsconfig: '<rootDir>/tsconfig.spec.json', tsconfig: '<rootDir>/tsconfig.spec.json',
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"executor": "@nx/jest:jest", "executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": { "options": {
"tsconfig": "libs/collaboration-shared/tsconfig.spec.json", "tsConfig": "libs/collaboration-shared/tsconfig.spec.json",
"jestConfig": "libs/collaboration-shared/jest.config.ts" "jestConfig": "libs/collaboration-shared/jest.config.ts"
} }
}, },
......
...@@ -8,9 +8,15 @@ describe('CollaborationService', () => { ...@@ -8,9 +8,15 @@ describe('CollaborationService', () => {
}); });
describe('is anfrage formular visible', () => { describe('is anfrage formular visible', () => {
it.skip('FIX TestSetup | should return value', () => { it('should return value', (done) => {
// const isVisible: Observable<boolean> = service.isAnfrageFormularVisible(); service.showAnfrageFormular$.next(false);
// expect(isVisible).toBeObservable(isVisible);
service.isAnfrageFormularVisible().subscribe((isVisible: boolean) => {
expect(isVisible).toBeTruthy();
done();
});
service.showAnfrageFormular();
}); });
}); });
......
...@@ -6,9 +6,7 @@ export class CollaborationService { ...@@ -6,9 +6,7 @@ export class CollaborationService {
showAnfrageFormular$: BehaviorSubject<boolean> = new BehaviorSubject(false); showAnfrageFormular$: BehaviorSubject<boolean> = new BehaviorSubject(false);
public isAnfrageFormularVisible(): Observable<boolean> { public isAnfrageFormularVisible(): Observable<boolean> {
//FIX TEST
return this.showAnfrageFormular$.asObservable(); return this.showAnfrageFormular$.asObservable();
//
} }
public showAnfrageFormular(): void { public showAnfrageFormular(): void {
......
...@@ -8,5 +8,5 @@ ...@@ -8,5 +8,5 @@
"useDefineForClassFields": false "useDefineForClassFields": false
}, },
"files": ["src/test-setup.ts"], "files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts", "jest.config.ts"] "include": ["**/*.test.ts", "**/*.spec.ts", "**/*.d.ts", "jest.config.ts"]
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment