mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 12:53:03 -05:00
refactor: notification
This commit is contained in:
36
libs/power-of-effect/backend/.eslintrc.json
Normal file
36
libs/power-of-effect/backend/.eslintrc.json
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"extends": ["../../../.eslintrc.json"],
|
||||
"ignorePatterns": ["!**/*"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"extends": [
|
||||
"plugin:@nx/angular",
|
||||
"plugin:@angular-eslint/template/process-inline-templates"
|
||||
],
|
||||
"rules": {
|
||||
"@angular-eslint/directive-selector": [
|
||||
"error",
|
||||
{
|
||||
"type": "attribute",
|
||||
"prefix": "lib",
|
||||
"style": "camelCase"
|
||||
}
|
||||
],
|
||||
"@angular-eslint/component-selector": [
|
||||
"error",
|
||||
{
|
||||
"type": "element",
|
||||
"prefix": "lib",
|
||||
"style": "kebab-case"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.html"],
|
||||
"extends": ["plugin:@nx/angular-template"],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
7
libs/power-of-effect/backend/README.md
Normal file
7
libs/power-of-effect/backend/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# power-of-effect-backend
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
|
||||
## Running unit tests
|
||||
|
||||
Run `nx test power-of-effect-backend` to execute the unit tests.
|
||||
23
libs/power-of-effect/backend/jest.config.ts
Normal file
23
libs/power-of-effect/backend/jest.config.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
/* eslint-disable */
|
||||
export default {
|
||||
displayName: 'power-of-effect-backend',
|
||||
preset: '../../../jest.preset.js',
|
||||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
||||
globals: {},
|
||||
coverageDirectory: '../../../coverage/libs/power-of-effect/backend',
|
||||
transform: {
|
||||
'^.+\\.(ts|mjs|js|html)$': [
|
||||
'jest-preset-angular',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
stringifyContentPathRegex: '\\.(html|svg)$',
|
||||
},
|
||||
],
|
||||
},
|
||||
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
|
||||
snapshotSerializers: [
|
||||
'jest-preset-angular/build/serializers/no-ng-attributes',
|
||||
'jest-preset-angular/build/serializers/ng-snapshot',
|
||||
'jest-preset-angular/build/serializers/html-comment',
|
||||
],
|
||||
};
|
||||
20
libs/power-of-effect/backend/project.json
Normal file
20
libs/power-of-effect/backend/project.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "power-of-effect-backend",
|
||||
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
||||
"projectType": "library",
|
||||
"sourceRoot": "libs/power-of-effect/backend/src",
|
||||
"prefix": "lib",
|
||||
"targets": {
|
||||
"test": {
|
||||
"executor": "@nx/jest:jest",
|
||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||
"options": {
|
||||
"jestConfig": "libs/power-of-effect/backend/jest.config.ts"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/eslint:lint"
|
||||
}
|
||||
},
|
||||
"tags": []
|
||||
}
|
||||
2
libs/power-of-effect/backend/src/index.ts
Normal file
2
libs/power-of-effect/backend/src/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './lib/fake-backend.service';
|
||||
export * from './lib/push.service';
|
||||
105
libs/power-of-effect/backend/src/lib/fake-backend.service.ts
Normal file
105
libs/power-of-effect/backend/src/lib/fake-backend.service.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import {
|
||||
randSchool,
|
||||
randStudent,
|
||||
randTeacher,
|
||||
} from '@angular-challenges/power-of-effect/model';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { randCompanyName, randFirstName } from '@ngneat/falso';
|
||||
import { concatLatestFrom } from '@ngrx/effects';
|
||||
import { map, tap, timer } from 'rxjs';
|
||||
import { FakeDBService } from './fake-db.service';
|
||||
import { PushService } from './push.service';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class FakeBackendService {
|
||||
private fakeDbService = inject(FakeDBService);
|
||||
private pushService = inject(PushService);
|
||||
|
||||
getAllTeachers = () => this.fakeDbService.teachers$;
|
||||
getAllStudents = () => this.fakeDbService.students$;
|
||||
getAllSchools = () => this.fakeDbService.schools$;
|
||||
|
||||
start() {
|
||||
this.fakeAddTeacher();
|
||||
this.fakeUpdateTeacher();
|
||||
this.fakeAddStudent();
|
||||
this.fakeUpdateStudent();
|
||||
this.fakeAddSchool();
|
||||
this.fakeUpdateSchool();
|
||||
}
|
||||
|
||||
private fakeAddTeacher() {
|
||||
timer(0, 4000)
|
||||
.pipe(
|
||||
map(() => randTeacher()),
|
||||
tap((teacher) => this.pushService.pushData(teacher)),
|
||||
tap((teacher) => this.fakeDbService.addTeacher(teacher)),
|
||||
)
|
||||
.subscribe();
|
||||
}
|
||||
|
||||
private fakeUpdateTeacher() {
|
||||
timer(8000, 5000)
|
||||
.pipe(
|
||||
concatLatestFrom(() => this.fakeDbService.randomTeacher$),
|
||||
map(([, teacher]) => ({
|
||||
...teacher,
|
||||
firstname: randFirstName(),
|
||||
version: teacher.version + 1,
|
||||
})),
|
||||
tap((teacher) => this.pushService.pushData(teacher)),
|
||||
tap((teacher) => this.fakeDbService.updateTeacher(teacher)),
|
||||
)
|
||||
.subscribe();
|
||||
}
|
||||
|
||||
private fakeAddStudent() {
|
||||
timer(0, 2000)
|
||||
.pipe(
|
||||
map(() => randStudent()),
|
||||
tap((student) => this.pushService.pushData(student)),
|
||||
tap((student) => this.fakeDbService.addStudent(student)),
|
||||
)
|
||||
.subscribe();
|
||||
}
|
||||
|
||||
private fakeUpdateStudent() {
|
||||
timer(8000, 6000)
|
||||
.pipe(
|
||||
concatLatestFrom(() => this.fakeDbService.randomStudents$),
|
||||
map(([, student]) => ({
|
||||
...student,
|
||||
firstname: randFirstName(),
|
||||
version: student.version + 1,
|
||||
})),
|
||||
tap((student) => this.pushService.pushData(student)),
|
||||
tap((student) => this.fakeDbService.updateSudent(student)),
|
||||
)
|
||||
.subscribe();
|
||||
}
|
||||
|
||||
private fakeAddSchool() {
|
||||
timer(0, 2000)
|
||||
.pipe(
|
||||
map(() => randSchool()),
|
||||
tap((school) => this.pushService.pushData(school)),
|
||||
tap((school) => this.fakeDbService.addSchool(school)),
|
||||
)
|
||||
.subscribe();
|
||||
}
|
||||
|
||||
private fakeUpdateSchool() {
|
||||
timer(8000, 4000)
|
||||
.pipe(
|
||||
concatLatestFrom(() => this.fakeDbService.randomSchool$),
|
||||
map(([, school]) => ({
|
||||
...school,
|
||||
name: randCompanyName(),
|
||||
version: school.version + 1,
|
||||
})),
|
||||
tap((school) => this.pushService.pushData(school)),
|
||||
tap((school) => this.fakeDbService.updateSchool(school)),
|
||||
)
|
||||
.subscribe();
|
||||
}
|
||||
}
|
||||
81
libs/power-of-effect/backend/src/lib/fake-db.service.ts
Normal file
81
libs/power-of-effect/backend/src/lib/fake-db.service.ts
Normal file
@@ -0,0 +1,81 @@
|
||||
import {
|
||||
School,
|
||||
Student,
|
||||
Teacher,
|
||||
} from '@angular-challenges/power-of-effect/model';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { randNumber } from '@ngneat/falso';
|
||||
import { ComponentStore } from '@ngrx/component-store';
|
||||
|
||||
interface AppState {
|
||||
teachers: Teacher[];
|
||||
students: Student[];
|
||||
schools: School[];
|
||||
}
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class FakeDBService extends ComponentStore<AppState> {
|
||||
readonly teachers$ = this.select((state) => state.teachers);
|
||||
readonly randomTeacher$ = this.select(
|
||||
this.teachers$,
|
||||
(teachers) => teachers[randNumber({ max: teachers.length - 1 })],
|
||||
);
|
||||
|
||||
readonly students$ = this.select((state) => state.students);
|
||||
readonly randomStudents$ = this.select(
|
||||
this.students$,
|
||||
(students) => students[randNumber({ max: students.length - 1 })],
|
||||
);
|
||||
|
||||
readonly schools$ = this.select((state) => state.schools);
|
||||
readonly randomSchool$ = this.select(
|
||||
this.schools$,
|
||||
(schools) => schools[randNumber({ max: schools.length - 1 })],
|
||||
);
|
||||
|
||||
constructor() {
|
||||
super({ teachers: [], students: [], schools: [] });
|
||||
}
|
||||
|
||||
addTeacher = this.updater(
|
||||
(state, teacher: Teacher): AppState => ({
|
||||
...state,
|
||||
teachers: [...state.teachers, teacher],
|
||||
}),
|
||||
);
|
||||
|
||||
updateTeacher = this.updater(
|
||||
(state, teacher: Teacher): AppState => ({
|
||||
...state,
|
||||
teachers: state.teachers.map((t) => (t.id === teacher.id ? teacher : t)),
|
||||
}),
|
||||
);
|
||||
|
||||
addStudent = this.updater(
|
||||
(state, student: Student): AppState => ({
|
||||
...state,
|
||||
students: [...state.students, student],
|
||||
}),
|
||||
);
|
||||
|
||||
updateSudent = this.updater(
|
||||
(state, student: Student): AppState => ({
|
||||
...state,
|
||||
students: state.students.map((t) => (t.id === student.id ? student : t)),
|
||||
}),
|
||||
);
|
||||
|
||||
addSchool = this.updater(
|
||||
(state, school: School): AppState => ({
|
||||
...state,
|
||||
schools: [...state.schools, school],
|
||||
}),
|
||||
);
|
||||
|
||||
updateSchool = this.updater(
|
||||
(state, school: School): AppState => ({
|
||||
...state,
|
||||
schools: state.schools.map((t) => (t.id === school.id ? school : t)),
|
||||
}),
|
||||
);
|
||||
}
|
||||
15
libs/power-of-effect/backend/src/lib/push.service.ts
Normal file
15
libs/power-of-effect/backend/src/lib/push.service.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Push } from '@angular-challenges/power-of-effect/model';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class PushService {
|
||||
private notificationSubject = new BehaviorSubject<Push | undefined>(
|
||||
undefined,
|
||||
);
|
||||
notification$ = this.notificationSubject.asObservable();
|
||||
|
||||
pushData(data: Push) {
|
||||
this.notificationSubject.next(data);
|
||||
}
|
||||
}
|
||||
1
libs/power-of-effect/backend/src/test-setup.ts
Normal file
1
libs/power-of-effect/backend/src/test-setup.ts
Normal file
@@ -0,0 +1 @@
|
||||
import 'jest-preset-angular/setup-jest';
|
||||
28
libs/power-of-effect/backend/tsconfig.json
Normal file
28
libs/power-of-effect/backend/tsconfig.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.lib.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json"
|
||||
}
|
||||
],
|
||||
"compilerOptions": {
|
||||
"target": "es2020",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"noImplicitOverride": true,
|
||||
"noPropertyAccessFromIndexSignature": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"enableI18nLegacyMessageIdFormat": false,
|
||||
"strictInjectionParameters": true,
|
||||
"strictInputAccessModifiers": true,
|
||||
"strictTemplates": true
|
||||
}
|
||||
}
|
||||
17
libs/power-of-effect/backend/tsconfig.lib.json
Normal file
17
libs/power-of-effect/backend/tsconfig.lib.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../../dist/out-tsc",
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"inlineSources": true,
|
||||
"types": []
|
||||
},
|
||||
"exclude": [
|
||||
"src/test-setup.ts",
|
||||
"**/*.spec.ts",
|
||||
"jest.config.ts",
|
||||
"**/*.test.ts"
|
||||
],
|
||||
"include": ["**/*.ts"]
|
||||
}
|
||||
10
libs/power-of-effect/backend/tsconfig.spec.json
Normal file
10
libs/power-of-effect/backend/tsconfig.spec.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../../dist/out-tsc",
|
||||
"module": "commonjs",
|
||||
"types": ["jest", "node"]
|
||||
},
|
||||
"files": ["src/test-setup.ts"],
|
||||
"include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
|
||||
}
|
||||
36
libs/power-of-effect/model/.eslintrc.json
Normal file
36
libs/power-of-effect/model/.eslintrc.json
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"extends": ["../../../.eslintrc.json"],
|
||||
"ignorePatterns": ["!**/*"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"extends": [
|
||||
"plugin:@nx/angular",
|
||||
"plugin:@angular-eslint/template/process-inline-templates"
|
||||
],
|
||||
"rules": {
|
||||
"@angular-eslint/directive-selector": [
|
||||
"error",
|
||||
{
|
||||
"type": "attribute",
|
||||
"prefix": "lib",
|
||||
"style": "camelCase"
|
||||
}
|
||||
],
|
||||
"@angular-eslint/component-selector": [
|
||||
"error",
|
||||
{
|
||||
"type": "element",
|
||||
"prefix": "lib",
|
||||
"style": "kebab-case"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.html"],
|
||||
"extends": ["plugin:@nx/angular-template"],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
7
libs/power-of-effect/model/README.md
Normal file
7
libs/power-of-effect/model/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# power-of-effect-model
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
|
||||
## Running unit tests
|
||||
|
||||
Run `nx test power-of-effect-model` to execute the unit tests.
|
||||
23
libs/power-of-effect/model/jest.config.ts
Normal file
23
libs/power-of-effect/model/jest.config.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
/* eslint-disable */
|
||||
export default {
|
||||
displayName: 'power-of-effect-model',
|
||||
preset: '../../../jest.preset.js',
|
||||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
||||
globals: {},
|
||||
coverageDirectory: '../../../coverage/libs/power-of-effect/model',
|
||||
transform: {
|
||||
'^.+\\.(ts|mjs|js|html)$': [
|
||||
'jest-preset-angular',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
stringifyContentPathRegex: '\\.(html|svg)$',
|
||||
},
|
||||
],
|
||||
},
|
||||
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
|
||||
snapshotSerializers: [
|
||||
'jest-preset-angular/build/serializers/no-ng-attributes',
|
||||
'jest-preset-angular/build/serializers/ng-snapshot',
|
||||
'jest-preset-angular/build/serializers/html-comment',
|
||||
],
|
||||
};
|
||||
20
libs/power-of-effect/model/project.json
Normal file
20
libs/power-of-effect/model/project.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "power-of-effect-model",
|
||||
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
||||
"projectType": "library",
|
||||
"sourceRoot": "libs/power-of-effect/model/src",
|
||||
"prefix": "lib",
|
||||
"targets": {
|
||||
"test": {
|
||||
"executor": "@nx/jest:jest",
|
||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||
"options": {
|
||||
"jestConfig": "libs/power-of-effect/model/jest.config.ts"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/eslint:lint"
|
||||
}
|
||||
},
|
||||
"tags": []
|
||||
}
|
||||
4
libs/power-of-effect/model/src/index.ts
Normal file
4
libs/power-of-effect/model/src/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export * from './lib/push.model';
|
||||
export * from './lib/school.model';
|
||||
export * from './lib/student.model';
|
||||
export * from './lib/teacher.model';
|
||||
5
libs/power-of-effect/model/src/lib/push.model.ts
Normal file
5
libs/power-of-effect/model/src/lib/push.model.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export type PushType = 'teacher' | 'student' | 'school';
|
||||
|
||||
export interface Push {
|
||||
type: PushType;
|
||||
}
|
||||
21
libs/power-of-effect/model/src/lib/school.model.ts
Normal file
21
libs/power-of-effect/model/src/lib/school.model.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { incrementalNumber, randCompanyName } from '@ngneat/falso';
|
||||
import { Push } from './push.model';
|
||||
|
||||
export interface School extends Push {
|
||||
id: number;
|
||||
name: string;
|
||||
version: number;
|
||||
}
|
||||
|
||||
const factorySchool = incrementalNumber();
|
||||
|
||||
export const randSchool = (): School => ({
|
||||
id: factorySchool(),
|
||||
name: randCompanyName(),
|
||||
version: 0,
|
||||
type: 'school',
|
||||
});
|
||||
|
||||
export const isSchool = (notif: Push): notif is School => {
|
||||
return notif.type === 'school';
|
||||
};
|
||||
23
libs/power-of-effect/model/src/lib/student.model.ts
Normal file
23
libs/power-of-effect/model/src/lib/student.model.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { incrementalNumber, randFirstName, randLastName } from '@ngneat/falso';
|
||||
import { Push } from './push.model';
|
||||
|
||||
export interface Student extends Push {
|
||||
id: number;
|
||||
firstname: string;
|
||||
lastname: string;
|
||||
version: number;
|
||||
}
|
||||
|
||||
const factoryStudent = incrementalNumber();
|
||||
|
||||
export const randStudent = (): Student => ({
|
||||
id: factoryStudent(),
|
||||
firstname: randFirstName(),
|
||||
lastname: randLastName(),
|
||||
version: 0,
|
||||
type: 'student',
|
||||
});
|
||||
|
||||
export const isStudent = (notif: Push): notif is Student => {
|
||||
return notif.type === 'student';
|
||||
};
|
||||
23
libs/power-of-effect/model/src/lib/teacher.model.ts
Normal file
23
libs/power-of-effect/model/src/lib/teacher.model.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { incrementalNumber, randFirstName, randLastName } from '@ngneat/falso';
|
||||
import { Push } from './push.model';
|
||||
|
||||
export interface Teacher extends Push {
|
||||
id: number;
|
||||
firstname: string;
|
||||
lastname: string;
|
||||
version: number;
|
||||
}
|
||||
|
||||
const factoryTeacher = incrementalNumber();
|
||||
|
||||
export const randTeacher = (): Teacher => ({
|
||||
id: factoryTeacher(),
|
||||
firstname: randFirstName(),
|
||||
lastname: randLastName(),
|
||||
version: 0,
|
||||
type: 'teacher',
|
||||
});
|
||||
|
||||
export const isTeacher = (notif: Push): notif is Teacher => {
|
||||
return notif.type === 'teacher';
|
||||
};
|
||||
1
libs/power-of-effect/model/src/test-setup.ts
Normal file
1
libs/power-of-effect/model/src/test-setup.ts
Normal file
@@ -0,0 +1 @@
|
||||
import 'jest-preset-angular/setup-jest';
|
||||
28
libs/power-of-effect/model/tsconfig.json
Normal file
28
libs/power-of-effect/model/tsconfig.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.lib.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json"
|
||||
}
|
||||
],
|
||||
"compilerOptions": {
|
||||
"target": "es2020",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"noImplicitOverride": true,
|
||||
"noPropertyAccessFromIndexSignature": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"enableI18nLegacyMessageIdFormat": false,
|
||||
"strictInjectionParameters": true,
|
||||
"strictInputAccessModifiers": true,
|
||||
"strictTemplates": true
|
||||
}
|
||||
}
|
||||
17
libs/power-of-effect/model/tsconfig.lib.json
Normal file
17
libs/power-of-effect/model/tsconfig.lib.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../../dist/out-tsc",
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"inlineSources": true,
|
||||
"types": []
|
||||
},
|
||||
"exclude": [
|
||||
"src/test-setup.ts",
|
||||
"**/*.spec.ts",
|
||||
"jest.config.ts",
|
||||
"**/*.test.ts"
|
||||
],
|
||||
"include": ["**/*.ts"]
|
||||
}
|
||||
10
libs/power-of-effect/model/tsconfig.spec.json
Normal file
10
libs/power-of-effect/model/tsconfig.spec.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../../dist/out-tsc",
|
||||
"module": "commonjs",
|
||||
"types": ["jest", "node"]
|
||||
},
|
||||
"files": ["src/test-setup.ts"],
|
||||
"include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
|
||||
}
|
||||
Reference in New Issue
Block a user