diff --git a/apps/angular/anchor-scrolling/jest.config.ts b/apps/angular/anchor-scrolling/jest.config.ts index 6915111..1665728 100644 --- a/apps/angular/anchor-scrolling/jest.config.ts +++ b/apps/angular/anchor-scrolling/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'angular-anchor-scrolling', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], coverageDirectory: '../../../coverage/apps/angular/anchor-scrolling', transform: { '^.+\\.(ts|mjs|js|html)$': [ diff --git a/apps/angular/bug-cd/jest.config.ts b/apps/angular/bug-cd/jest.config.ts index 1f24a7c..ded316d 100644 --- a/apps/angular/bug-cd/jest.config.ts +++ b/apps/angular/bug-cd/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'angular-bug-cd', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], coverageDirectory: '../../../coverage/apps/angular/bug-cd', transform: { '^.+\\.(ts|mjs|js|html)$': [ diff --git a/apps/angular/crud/jest.config.ts b/apps/angular/crud/jest.config.ts index 74a17f1..4850991 100644 --- a/apps/angular/crud/jest.config.ts +++ b/apps/angular/crud/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'angular-crud', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], globals: {}, coverageDirectory: '../../../coverage/apps/angular/crud', transform: { diff --git a/apps/angular/injection-token/jest.config.ts b/apps/angular/injection-token/jest.config.ts index d7105f8..c48bb49 100644 --- a/apps/angular/injection-token/jest.config.ts +++ b/apps/angular/injection-token/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'angular-injection-token', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], coverageDirectory: '../../../coverage/apps/angular/injection-token', transform: { '^.+\\.(ts|mjs|js|html)$': [ diff --git a/apps/angular/interop-rxjs-signal/jest.config.ts b/apps/angular/interop-rxjs-signal/jest.config.ts index 23956eb..53f7481 100644 --- a/apps/angular/interop-rxjs-signal/jest.config.ts +++ b/apps/angular/interop-rxjs-signal/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'angular-interop-rxjs-signal', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], coverageDirectory: '../../../coverage/apps/angular/interop-rxjs-signal', transform: { '^.+\\.(ts|mjs|js|html)$': [ diff --git a/apps/angular/projection/jest.config.ts b/apps/angular/projection/jest.config.ts index 289a9b0..2af97a3 100644 --- a/apps/angular/projection/jest.config.ts +++ b/apps/angular/projection/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'angular-projection', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], globals: {}, coverageDirectory: '../../../coverage/apps/angular/projection', transform: { diff --git a/apps/angular/router-input/src/app/app.component.ts b/apps/angular/router-input/src/app/app.component.ts index 0fd4b31..1ef7e32 100644 --- a/apps/angular/router-input/src/app/app.component.ts +++ b/apps/angular/router-input/src/app/app.component.ts @@ -12,7 +12,7 @@ import { RouterLink, RouterModule } from '@angular/router'; diff --git a/apps/angular/router-input/src/app/app.routes.ts b/apps/angular/router-input/src/app/app.routes.ts index 215c016..f5d3487 100644 --- a/apps/angular/router-input/src/app/app.routes.ts +++ b/apps/angular/router-input/src/app/app.routes.ts @@ -6,7 +6,7 @@ export const appRoutes: Route[] = [ loadComponent: () => import('./home.component'), }, { - path: 'test/:testId', + path: 'subscription/:testId', loadComponent: () => import('./test.component'), data: { permission: 'admin', diff --git a/apps/angular/router-input/src/app/test.component.ts b/apps/angular/router-input/src/app/test.component.ts index 56ac3f7..88c1465 100644 --- a/apps/angular/router-input/src/app/test.component.ts +++ b/apps/angular/router-input/src/app/test.component.ts @@ -2,8 +2,9 @@ import { AsyncPipe } from '@angular/common'; import { Component, inject } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { map } from 'rxjs'; + @Component({ - selector: 'app-test', + selector: 'app-subscription', standalone: true, imports: [AsyncPipe], template: ` diff --git a/apps/forms/control-value-accessor/jest.config.ts b/apps/forms/control-value-accessor/jest.config.ts index 4af08e1..a52c898 100644 --- a/apps/forms/control-value-accessor/jest.config.ts +++ b/apps/forms/control-value-accessor/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'forms-control-value-accessor', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], coverageDirectory: '../../../coverage/apps/forms/control-value-accessor', transform: { '^.+\\.(ts|mjs|js|html)$': [ diff --git a/apps/ngrx/effect-selector/jest.config.ts b/apps/ngrx/effect-selector/jest.config.ts index 86ed38d..7e97f0b 100644 --- a/apps/ngrx/effect-selector/jest.config.ts +++ b/apps/ngrx/effect-selector/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'ngrx-effect-selector', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], globals: {}, coverageDirectory: '../../../coverage/apps/ngrx/effect-selector', transform: { diff --git a/apps/performance/ngfor-optimize/jest.config.ts b/apps/performance/ngfor-optimize/jest.config.ts index 5b2ccae..49ac9d7 100644 --- a/apps/performance/ngfor-optimize/jest.config.ts +++ b/apps/performance/ngfor-optimize/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'performance-ngfor-optimize', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], coverageDirectory: '../../../coverage/apps/performance/ngfor-optimize', transform: { '^.+\\.(ts|mjs|js|html)$': [ diff --git a/apps/performance/scroll-cd/jest.config.ts b/apps/performance/scroll-cd/jest.config.ts index 4c91050..7e8ea5b 100644 --- a/apps/performance/scroll-cd/jest.config.ts +++ b/apps/performance/scroll-cd/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'performance-scroll-cd', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], globals: {}, coverageDirectory: '../../../coverage/apps/performance/scroll-cd', transform: { diff --git a/apps/rxjs/catch-error/jest.config.ts b/apps/rxjs/catch-error/jest.config.ts index f823420..be57e8c 100644 --- a/apps/rxjs/catch-error/jest.config.ts +++ b/apps/rxjs/catch-error/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'rxjs-catch-error', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], coverageDirectory: '../../../coverage/apps/rxjs/catch-error', transform: { '^.+\\.(ts|mjs|js|html)$': [ diff --git a/apps/rxjs/race-condition/cypress/support/component.ts b/apps/rxjs/race-condition/cypress/support/component.ts index e3684db..e7c3e3c 100644 --- a/apps/rxjs/race-condition/cypress/support/component.ts +++ b/apps/rxjs/race-condition/cypress/support/component.ts @@ -1,6 +1,6 @@ // *********************************************************** // This example support/component.ts is processed and -// loaded automatically before your test files. +// loaded automatically before your subscription files. // // This is a great place to put global configuration and // behavior that modifies Cypress. diff --git a/apps/rxjs/race-condition/jest.config.ts b/apps/rxjs/race-condition/jest.config.ts index 2e2e892..b774568 100644 --- a/apps/rxjs/race-condition/jest.config.ts +++ b/apps/rxjs/race-condition/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'rxjs-race-condition', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], globals: {}, coverageDirectory: '../../../coverage/apps/rxjs/race-condition', transform: { diff --git a/apps/testing/checkbox/jest.config.ts b/apps/testing/checkbox/jest.config.ts index 0c59029..ea6f808 100644 --- a/apps/testing/checkbox/jest.config.ts +++ b/apps/testing/checkbox/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'testing-checkbox', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], coverageDirectory: '../../../coverage/apps/testing/checkbox', transform: { '^.+\\.(ts|mjs|js|html)$': [ diff --git a/apps/testing/create-harness/jest.config.ts b/apps/testing/create-harness/jest.config.ts index 1178b8a..195dab1 100644 --- a/apps/testing/create-harness/jest.config.ts +++ b/apps/testing/create-harness/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'testing-create-harness', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], transform: { '^.+\\.(ts|mjs|js|html)$': [ 'jest-preset-angular', diff --git a/apps/testing/harness/jest.config.ts b/apps/testing/harness/jest.config.ts index 2b9e6d4..e342863 100644 --- a/apps/testing/harness/jest.config.ts +++ b/apps/testing/harness/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'testing-harness', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], transform: { '^.+\\.(ts|mjs|js|html)$': [ 'jest-preset-angular', diff --git a/apps/testing/input-output/cypress/support/component.ts b/apps/testing/input-output/cypress/support/component.ts index e3684db..e7c3e3c 100644 --- a/apps/testing/input-output/cypress/support/component.ts +++ b/apps/testing/input-output/cypress/support/component.ts @@ -1,6 +1,6 @@ // *********************************************************** // This example support/component.ts is processed and -// loaded automatically before your test files. +// loaded automatically before your subscription files. // // This is a great place to put global configuration and // behavior that modifies Cypress. diff --git a/apps/testing/input-output/jest.config.ts b/apps/testing/input-output/jest.config.ts index 63370e2..7d23121 100644 --- a/apps/testing/input-output/jest.config.ts +++ b/apps/testing/input-output/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'testing-input-output', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], transform: { '^.+\\.(ts|mjs|js|html)$': [ 'jest-preset-angular', diff --git a/apps/testing/modal/cypress/support/component.ts b/apps/testing/modal/cypress/support/component.ts index e3684db..e7c3e3c 100644 --- a/apps/testing/modal/cypress/support/component.ts +++ b/apps/testing/modal/cypress/support/component.ts @@ -1,6 +1,6 @@ // *********************************************************** // This example support/component.ts is processed and -// loaded automatically before your test files. +// loaded automatically before your subscription files. // // This is a great place to put global configuration and // behavior that modifies Cypress. diff --git a/apps/testing/modal/jest.config.ts b/apps/testing/modal/jest.config.ts index 809080b..137c0c8 100644 --- a/apps/testing/modal/jest.config.ts +++ b/apps/testing/modal/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'testing-modal', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], transform: { '^.+\\.(ts|mjs|js|html)$': [ 'jest-preset-angular', diff --git a/apps/testing/nested/cypress/support/component.ts b/apps/testing/nested/cypress/support/component.ts index e3684db..e7c3e3c 100644 --- a/apps/testing/nested/cypress/support/component.ts +++ b/apps/testing/nested/cypress/support/component.ts @@ -1,6 +1,6 @@ // *********************************************************** // This example support/component.ts is processed and -// loaded automatically before your test files. +// loaded automatically before your subscription files. // // This is a great place to put global configuration and // behavior that modifies Cypress. diff --git a/apps/testing/nested/jest.config.ts b/apps/testing/nested/jest.config.ts index a89947b..b6643db 100644 --- a/apps/testing/nested/jest.config.ts +++ b/apps/testing/nested/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'testing-nested', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], transform: { '^.+\\.(ts|mjs|js|html)$': [ 'jest-preset-angular', diff --git a/apps/testing/router-outlet/cypress/support/component.ts b/apps/testing/router-outlet/cypress/support/component.ts index e3684db..e7c3e3c 100644 --- a/apps/testing/router-outlet/cypress/support/component.ts +++ b/apps/testing/router-outlet/cypress/support/component.ts @@ -1,6 +1,6 @@ // *********************************************************** // This example support/component.ts is processed and -// loaded automatically before your test files. +// loaded automatically before your subscription files. // // This is a great place to put global configuration and // behavior that modifies Cypress. diff --git a/apps/testing/router-outlet/jest.config.ts b/apps/testing/router-outlet/jest.config.ts index 0bca8ae..f8f0ad1 100644 --- a/apps/testing/router-outlet/jest.config.ts +++ b/apps/testing/router-outlet/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'testing-router-outlet', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], globals: {}, transform: { '^.+\\.(ts|mjs|js|html)$': [ diff --git a/apps/testing/table/README.md b/apps/testing/table/README.md index 36451ff..ff3b4b5 100644 --- a/apps/testing/table/README.md +++ b/apps/testing/table/README.md @@ -10,13 +10,13 @@ NOT IMPLEMENTED YET If the title is correctly typed, you can send the request otherwise you get a nice error and the request is not sent. You can play with it by running : `npx nx serve testing-table`. -The goal is to test this behavior with Testing library and Cypress +The goal is to subscription this behavior with Testing library and Cypress -The file named `child.component.spec.ts` will let test your application using Testing Library. To run the test suits, you need to run `npx nx test testing-table`. You can also install [Jest Runner](https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner) to execute your test by clicking on the `Run` button above each `describe` or `it` blocks. +The file named `child.component.spec.ts` will let subscription your application using Testing Library. To run the subscription suits, you need to run `npx nx subscription testing-table`. You can also install [Jest Runner](https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner) to execute your subscription by clicking on the `Run` button above each `describe` or `it` blocks. -For testing cypress, you will execute your test inside the `child.component.cy.ts` and run `npx nx component-test testing-table` to execute your test suits. You can add the `--watch` flag to execute your test in watch mode. +For testing cypress, you will execute your subscription inside the `child.component.cy.ts` and run `npx nx component-subscription testing-table` to execute your subscription suits. You can add the `--watch` flag to execute your subscription in watch mode. -I created some `it` blocks but feel free to add more test if you like to. --> +I created some `it` blocks but feel free to add more subscription if you like to. --> ### Submitting your work diff --git a/apps/testing/table/cypress/support/component.ts b/apps/testing/table/cypress/support/component.ts index e3684db..e7c3e3c 100644 --- a/apps/testing/table/cypress/support/component.ts +++ b/apps/testing/table/cypress/support/component.ts @@ -1,6 +1,6 @@ // *********************************************************** // This example support/component.ts is processed and -// loaded automatically before your test files. +// loaded automatically before your subscription files. // // This is a great place to put global configuration and // behavior that modifies Cypress. diff --git a/apps/testing/table/jest.config.ts b/apps/testing/table/jest.config.ts index 56b0e7d..98474ec 100644 --- a/apps/testing/table/jest.config.ts +++ b/apps/testing/table/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'testing-table', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], transform: { '^.+\\.(ts|mjs|js|html)$': [ 'jest-preset-angular', diff --git a/apps/testing/table/src/app/table.component.spec.ts b/apps/testing/table/src/app/table.component.spec.ts index 2b71f26..db4015d 100644 --- a/apps/testing/table/src/app/table.component.spec.ts +++ b/apps/testing/table/src/app/table.component.spec.ts @@ -40,7 +40,7 @@ describe('AppComponent', () => { // await userEvent.click(okButton); }); - // test('error message is shown if you click "Cancel" in the confirmation modal after submitting a name', async () => { + // subscription('error message is shown if you click "Cancel" in the confirmation modal after submitting a name', async () => { // userEvent.setup(); // await render(AppComponent); @@ -68,7 +68,7 @@ describe('AppComponent', () => { // expect(errorText).toBeInTheDocument(); // }); - // test('confirm message is shown if you click "Confirm" in the confirmation modal after submitting a name', async () => { + // subscription('confirm message is shown if you click "Confirm" in the confirmation modal after submitting a name', async () => { // userEvent.setup(); // await render(AppComponent); diff --git a/apps/testing/todos-list/cypress/support/component.ts b/apps/testing/todos-list/cypress/support/component.ts index e3684db..e7c3e3c 100644 --- a/apps/testing/todos-list/cypress/support/component.ts +++ b/apps/testing/todos-list/cypress/support/component.ts @@ -1,6 +1,6 @@ // *********************************************************** // This example support/component.ts is processed and -// loaded automatically before your test files. +// loaded automatically before your subscription files. // // This is a great place to put global configuration and // behavior that modifies Cypress. diff --git a/apps/testing/todos-list/jest.config.ts b/apps/testing/todos-list/jest.config.ts index eb61074..3b92b56 100644 --- a/apps/testing/todos-list/jest.config.ts +++ b/apps/testing/todos-list/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'testing-todos-list', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], transform: { '^.+\\.(ts|mjs|js|html)$': [ 'jest-preset-angular', diff --git a/docs/src/components/ActionButtonFooter.astro b/docs/src/components/ActionButtonFooter.astro index 9a8b3f2..1287bc0 100644 --- a/docs/src/components/ActionButtonFooter.astro +++ b/docs/src/components/ActionButtonFooter.astro @@ -4,48 +4,53 @@ import MyIcon from './MyIcon.astro'; import type { Props } from '@astrojs/starlight/props'; const { labels } = Astro.props; - --- diff --git a/docs/src/components/SubscriptionForm.astro b/docs/src/components/SubscriptionForm.astro index 8128a54..a6072af 100644 --- a/docs/src/components/SubscriptionForm.astro +++ b/docs/src/components/SubscriptionForm.astro @@ -1,104 +1,93 @@ --- -import { Card } from '@astrojs/starlight/components'; +import ClipboardCopy from './ClipboardCopy.astro'; +const { isNote } = Astro.props; --- - -
-
-
-
-
-
-
-

Get updated when a new Challenge is published

-
-
-
+
+
-
- -
- - -
+
+ +
+
- + +{isNote ? + + : +*This email will only be used for sending new challenges updates. + } + + diff --git a/docs/src/content/docs/challenges/nx/25-generator-lib-ext.md b/docs/src/content/docs/challenges/nx/25-generator-lib-ext.md index 5119fc6..545b281 100644 --- a/docs/src/content/docs/challenges/nx/25-generator-lib-ext.md +++ b/docs/src/content/docs/challenges/nx/25-generator-lib-ext.md @@ -32,7 +32,7 @@ You should only override the jest configuration is the `unitTestRunner` option i export default { displayName: '< libName >', // 👈 lib name preset: '../../../jest.preset.js', // 👈 be careful with the path - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], transform: { '^.+\\.(ts|mjs|js|html)$': [ 'jest-preset-angular', diff --git a/docs/src/content/docs/index.mdx b/docs/src/content/docs/index.mdx index e639a21..d81639c 100644 --- a/docs/src/content/docs/index.mdx +++ b/docs/src/content/docs/index.mdx @@ -24,12 +24,20 @@ hero: import { Card, CardGrid } from '@astrojs/starlight/components'; import MyIcon from '../../components/MyIcon.astro'; +import SubscriptionForm from '../../components/SubscriptionForm.astro' + + + This repository gathers 43 challenges related to Angular, Nx, RxJS, Ngrx and Typescript. These challenges resolve around real-life issues or specific features to elevate your skills. + + + + One of the goals of this repository is to lower the barrier to entry for Open Source Software (OSS). By engaging with these challenges, you will diff --git a/docs/src/content/docs/subscription/index.mdx b/docs/src/content/docs/subscription/index.mdx new file mode 100644 index 0000000..cf987d5 --- /dev/null +++ b/docs/src/content/docs/subscription/index.mdx @@ -0,0 +1,10 @@ +--- +title: Subscription +description: Subscribe to email. +noCommentSection: true +--- +import SubscriptionForm from '../../../components/SubscriptionForm.astro' + +
If you want to be informed of new challenges, you can subscribe to the email form.
+ + diff --git a/docs/src/content/docs/test/index.mdx b/docs/src/content/docs/test/index.mdx deleted file mode 100644 index caa4031..0000000 --- a/docs/src/content/docs/test/index.mdx +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Test -description: Guide to checking out someone else's answer. -sidebar: - order: 3 ---- -import SubscriptionForm from '../../../components/SubscriptionForm.astro' - - diff --git a/docs/src/styles/custom-css.css b/docs/src/styles/custom-css.css index 85f44af..4d4ccf8 100644 --- a/docs/src/styles/custom-css.css +++ b/docs/src/styles/custom-css.css @@ -159,3 +159,7 @@ details { cursor: pointer; } } + +.body:where(.astro-v5tidmuc) { + height: 100%; +} diff --git a/jest.preset.js b/jest.preset.js index c1c3c4c..7b7da1b 100644 --- a/jest.preset.js +++ b/jest.preset.js @@ -8,8 +8,8 @@ module.exports = { * It's recommend you update to the latest format. * You can do this by removing snapshotFormat property * and running tests with --update-snapshot flag. - * Example: "nx affected --targets=test --update-snapshot" + * Example: "nx affected --targets=subscription --update-snapshot" * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format */ - snapshotFormat: { escapeString: true, printBasicPrototype: true }, + snapshotFormat: { escapeString: true, printBasicPrototype: true } }; diff --git a/libs/angular/di/jest.config.ts b/libs/angular/di/jest.config.ts index 79303be..3ac5226 100644 --- a/libs/angular/di/jest.config.ts +++ b/libs/angular/di/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'angular/di', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], coverageDirectory: '../../../coverage/libs/angular/di', transform: { '^.+\\.(ts|mjs|js|html)$': [ diff --git a/libs/decoupling/brain/jest.config.ts b/libs/decoupling/brain/jest.config.ts index 443cc73..4e97ee0 100644 --- a/libs/decoupling/brain/jest.config.ts +++ b/libs/decoupling/brain/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'decoupling-brain', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], coverageDirectory: '../../../coverage/libs/decoupling/brain', transform: { '^.+\\.(ts|mjs|js|html)$': [ diff --git a/libs/decoupling/core/jest.config.ts b/libs/decoupling/core/jest.config.ts index f755dfa..332658d 100644 --- a/libs/decoupling/core/jest.config.ts +++ b/libs/decoupling/core/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'decoupling-core', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], coverageDirectory: '../../../coverage/libs/decoupling/core', transform: { '^.+\\.(ts|mjs|js|html)$': [ diff --git a/libs/decoupling/helmet/jest.config.ts b/libs/decoupling/helmet/jest.config.ts index 961b9e9..1adccce 100644 --- a/libs/decoupling/helmet/jest.config.ts +++ b/libs/decoupling/helmet/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'decoupling-helmet', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], coverageDirectory: '../../../coverage/libs/decoupling/helmet', transform: { '^.+\\.(ts|mjs|js|html)$': [ diff --git a/libs/module-to-standalone/admin/feature/jest.config.ts b/libs/module-to-standalone/admin/feature/jest.config.ts index 547252e..4b02a6a 100644 --- a/libs/module-to-standalone/admin/feature/jest.config.ts +++ b/libs/module-to-standalone/admin/feature/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'module-to-standalone-admin-feature', preset: '../../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], coverageDirectory: '../../../../coverage/libs/module-to-standalone/admin/feature', transform: { diff --git a/libs/module-to-standalone/admin/shared/jest.config.ts b/libs/module-to-standalone/admin/shared/jest.config.ts index 41e6691..7ecd6da 100644 --- a/libs/module-to-standalone/admin/shared/jest.config.ts +++ b/libs/module-to-standalone/admin/shared/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'module-to-standalone-admin-shared', preset: '../../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], coverageDirectory: '../../../../coverage/libs/module-to-standalone/admin/shared', transform: { diff --git a/libs/module-to-standalone/core/providers/jest.config.ts b/libs/module-to-standalone/core/providers/jest.config.ts index d7c3486..f3c281d 100644 --- a/libs/module-to-standalone/core/providers/jest.config.ts +++ b/libs/module-to-standalone/core/providers/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'module-to-standalone-core-providers', preset: '../../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], coverageDirectory: '../../../../coverage/libs/module-to-standalone/core/providers', transform: { diff --git a/libs/module-to-standalone/core/service/jest.config.ts b/libs/module-to-standalone/core/service/jest.config.ts index 82808fc..8738d54 100644 --- a/libs/module-to-standalone/core/service/jest.config.ts +++ b/libs/module-to-standalone/core/service/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'module-to-standalone-core-service', preset: '../../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], coverageDirectory: '../../../../coverage/libs/module-to-standalone/core/service', transform: { diff --git a/libs/module-to-standalone/forbidden/jest.config.ts b/libs/module-to-standalone/forbidden/jest.config.ts index 7470436..957e0a9 100644 --- a/libs/module-to-standalone/forbidden/jest.config.ts +++ b/libs/module-to-standalone/forbidden/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'module-to-standalone-forbidden', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], coverageDirectory: '../../../coverage/libs/module-to-standalone/forbidden', transform: { '^.+\\.(ts|mjs|js|html)$': [ diff --git a/libs/module-to-standalone/home/jest.config.ts b/libs/module-to-standalone/home/jest.config.ts index b4d6a04..e5d36e5 100644 --- a/libs/module-to-standalone/home/jest.config.ts +++ b/libs/module-to-standalone/home/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'module-to-standalone-home', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], coverageDirectory: '../../../coverage/libs/module-to-standalone/home', transform: { '^.+\\.(ts|mjs|js|html)$': [ diff --git a/libs/module-to-standalone/shell/jest.config.ts b/libs/module-to-standalone/shell/jest.config.ts index ff53f23..700343e 100644 --- a/libs/module-to-standalone/shell/jest.config.ts +++ b/libs/module-to-standalone/shell/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'module-to-standalone-shell', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], coverageDirectory: '../../../coverage/libs/module-to-standalone/shell', transform: { '^.+\\.(ts|mjs|js|html)$': [ diff --git a/libs/module-to-standalone/user/contact/jest.config.ts b/libs/module-to-standalone/user/contact/jest.config.ts index c6402b9..e0cdc79 100644 --- a/libs/module-to-standalone/user/contact/jest.config.ts +++ b/libs/module-to-standalone/user/contact/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'module-to-standalone-user-contact', preset: '../../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], coverageDirectory: '../../../../coverage/libs/module-to-standalone/user/contact', transform: { diff --git a/libs/module-to-standalone/user/home/jest.config.ts b/libs/module-to-standalone/user/home/jest.config.ts index 90ae704..e7f5f1f 100644 --- a/libs/module-to-standalone/user/home/jest.config.ts +++ b/libs/module-to-standalone/user/home/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'module-to-standalone-user-home', preset: '../../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], coverageDirectory: '../../../../coverage/libs/module-to-standalone/user/home', transform: { '^.+\\.(ts|mjs|js|html)$': [ diff --git a/libs/module-to-standalone/user/shell/jest.config.ts b/libs/module-to-standalone/user/shell/jest.config.ts index 74a019b..e7cae43 100644 --- a/libs/module-to-standalone/user/shell/jest.config.ts +++ b/libs/module-to-standalone/user/shell/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'module-to-standalone-user-shell', preset: '../../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], coverageDirectory: '../../../../coverage/libs/module-to-standalone/user/shell', transform: { diff --git a/libs/ngrx-notification/backend/jest.config.ts b/libs/ngrx-notification/backend/jest.config.ts index 5152a2f..ff7b20c 100644 --- a/libs/ngrx-notification/backend/jest.config.ts +++ b/libs/ngrx-notification/backend/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'ngrx-notification-backend', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], globals: {}, coverageDirectory: '../../../coverage/libs/ngrx-notification/backend', transform: { diff --git a/libs/ngrx-notification/model/jest.config.ts b/libs/ngrx-notification/model/jest.config.ts index f9083fa..797a221 100644 --- a/libs/ngrx-notification/model/jest.config.ts +++ b/libs/ngrx-notification/model/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'ngrx-notification-model', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], globals: {}, coverageDirectory: '../../../coverage/libs/ngrx-notification/model', transform: { diff --git a/libs/shared/directives/jest.config.ts b/libs/shared/directives/jest.config.ts index 3d1f082..b0dbb35 100644 --- a/libs/shared/directives/jest.config.ts +++ b/libs/shared/directives/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'shared-directives', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], coverageDirectory: '../../../coverage/libs/shared/directives', transform: { '^.+\\.(ts|mjs|js|html)$': [ diff --git a/libs/shared/ngrx-callstate-store/jest.config.ts b/libs/shared/ngrx-callstate-store/jest.config.ts index 6c6eb92..bd94236 100644 --- a/libs/shared/ngrx-callstate-store/jest.config.ts +++ b/libs/shared/ngrx-callstate-store/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'shared-ngrx-callstate-store', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], globals: {}, coverageDirectory: '../../../coverage/libs/shared/ngrx-callstate-store', transform: { diff --git a/libs/shared/utils/jest.config.ts b/libs/shared/utils/jest.config.ts index 278c93a..e708878 100644 --- a/libs/shared/utils/jest.config.ts +++ b/libs/shared/utils/jest.config.ts @@ -2,7 +2,7 @@ export default { displayName: 'shared-utils', preset: '../../../jest.preset.js', - setupFilesAfterEnv: ['/src/test-setup.ts'], + setupFilesAfterEnv: ['/src/subscription-setup.ts'], globals: {}, coverageDirectory: '../../../coverage/libs/shared/utils', transform: {