fix(test): move all test apps
@@ -1,21 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
export default {
|
|
||||||
displayName: 'test-table',
|
|
||||||
preset: '../../../jest.preset.js',
|
|
||||||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
|
||||||
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',
|
|
||||||
],
|
|
||||||
};
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
export default {
|
|
||||||
displayName: 'test-todos-list',
|
|
||||||
preset: '../../../jest.preset.js',
|
|
||||||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
|
||||||
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',
|
|
||||||
],
|
|
||||||
};
|
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
### Run Application
|
### Run Application
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npx nx serve test-checkbox
|
npx nx serve testing-checkbox
|
||||||
```
|
```
|
||||||
|
|
||||||
### Documentation and Instruction
|
### Documentation and Instruction
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
export default {
|
export default {
|
||||||
displayName: 'test-checkbox',
|
displayName: 'testing-checkbox',
|
||||||
preset: '../../../jest.preset.js',
|
preset: '../../../jest.preset.js',
|
||||||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
||||||
coverageDirectory: '../../../coverage/apps/test/checkbox',
|
coverageDirectory: '../../../coverage/apps/testing/checkbox',
|
||||||
transform: {
|
transform: {
|
||||||
'^.+\\.(ts|mjs|js|html)$': [
|
'^.+\\.(ts|mjs|js|html)$': [
|
||||||
'jest-preset-angular',
|
'jest-preset-angular',
|
||||||
@@ -1,25 +1,25 @@
|
|||||||
{
|
{
|
||||||
"name": "test-harness",
|
"name": "testing-checkbox",
|
||||||
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
||||||
"projectType": "application",
|
"projectType": "application",
|
||||||
"prefix": "app",
|
"prefix": "app",
|
||||||
"sourceRoot": "apps/test/harness/src",
|
"sourceRoot": "apps/testing/checkbox/src",
|
||||||
"tags": [],
|
"tags": [],
|
||||||
"targets": {
|
"targets": {
|
||||||
"build": {
|
"build": {
|
||||||
"executor": "@angular-devkit/build-angular:browser",
|
"executor": "@angular-devkit/build-angular:browser",
|
||||||
"outputs": ["{options.outputPath}"],
|
"outputs": ["{options.outputPath}"],
|
||||||
"options": {
|
"options": {
|
||||||
"outputPath": "dist/apps/test/harness",
|
"outputPath": "dist/apps/testing/checkbox",
|
||||||
"index": "apps/test/harness/src/index.html",
|
"index": "apps/testing/checkbox/src/index.html",
|
||||||
"main": "apps/test/harness/src/main.ts",
|
"main": "apps/testing/checkbox/src/main.ts",
|
||||||
"polyfills": ["zone.js"],
|
"polyfills": ["zone.js"],
|
||||||
"tsConfig": "apps/test/harness/tsconfig.app.json",
|
"tsConfig": "apps/testing/checkbox/tsconfig.app.json",
|
||||||
"assets": [
|
"assets": [
|
||||||
"apps/test/harness/src/favicon.ico",
|
"apps/testing/checkbox/src/favicon.ico",
|
||||||
"apps/test/harness/src/assets"
|
"apps/testing/checkbox/src/assets"
|
||||||
],
|
],
|
||||||
"styles": ["apps/test/harness/src/styles.scss"],
|
"styles": ["apps/testing/checkbox/src/styles.scss"],
|
||||||
"scripts": []
|
"scripts": []
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
@@ -53,10 +53,10 @@
|
|||||||
"executor": "@angular-devkit/build-angular:dev-server",
|
"executor": "@angular-devkit/build-angular:dev-server",
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"browserTarget": "test-harness:build:production"
|
"browserTarget": "testing-checkbox:build:production"
|
||||||
},
|
},
|
||||||
"development": {
|
"development": {
|
||||||
"browserTarget": "test-harness:build:development"
|
"browserTarget": "testing-checkbox:build:development"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"defaultConfiguration": "development"
|
"defaultConfiguration": "development"
|
||||||
@@ -64,14 +64,24 @@
|
|||||||
"extract-i18n": {
|
"extract-i18n": {
|
||||||
"executor": "@angular-devkit/build-angular:extract-i18n",
|
"executor": "@angular-devkit/build-angular:extract-i18n",
|
||||||
"options": {
|
"options": {
|
||||||
"browserTarget": "test-harness:build"
|
"browserTarget": "testing-checkbox:build"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"executor": "@nx/linter:eslint",
|
||||||
|
"outputs": ["{options.outputFile}"],
|
||||||
|
"options": {
|
||||||
|
"lintFilePatterns": [
|
||||||
|
"apps/testing/checkbox/**/*.ts",
|
||||||
|
"apps/testing/checkbox/**/*.html"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"executor": "@nx/jest:jest",
|
"executor": "@nx/jest:jest",
|
||||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||||
"options": {
|
"options": {
|
||||||
"jestConfig": "apps/test/harness/jest.config.ts",
|
"jestConfig": "apps/testing/checkbox/jest.config.ts",
|
||||||
"passWithNoTests": true
|
"passWithNoTests": true
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
@@ -80,16 +90,6 @@
|
|||||||
"codeCoverage": true
|
"codeCoverage": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"lint": {
|
|
||||||
"executor": "@nx/linter:eslint",
|
|
||||||
"outputs": ["{options.outputFile}"],
|
|
||||||
"options": {
|
|
||||||
"lintFilePatterns": [
|
|
||||||
"apps/test/harness/**/*.ts",
|
|
||||||
"apps/test/harness/**/*.html"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -5,7 +5,7 @@
|
|||||||
### Run Application
|
### Run Application
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npx nx serve test-create-harness
|
npx nx serve testing-create-harness
|
||||||
```
|
```
|
||||||
|
|
||||||
### Documentation and Instruction
|
### Documentation and Instruction
|
||||||
21
apps/testing/create-harness/jest.config.ts
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
export default {
|
||||||
|
displayName: 'testing-create-harness',
|
||||||
|
preset: '../../../jest.preset.js',
|
||||||
|
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
||||||
|
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',
|
||||||
|
],
|
||||||
|
};
|
||||||
@@ -1,25 +1,25 @@
|
|||||||
{
|
{
|
||||||
"name": "test-create-harness",
|
"name": "testing-create-harness",
|
||||||
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
||||||
"projectType": "application",
|
"projectType": "application",
|
||||||
"prefix": "app",
|
"prefix": "app",
|
||||||
"sourceRoot": "apps/test/create-harness/src",
|
"sourceRoot": "apps/testing/create-harness/src",
|
||||||
"tags": [],
|
"tags": [],
|
||||||
"targets": {
|
"targets": {
|
||||||
"build": {
|
"build": {
|
||||||
"executor": "@angular-devkit/build-angular:browser",
|
"executor": "@angular-devkit/build-angular:browser",
|
||||||
"outputs": ["{options.outputPath}"],
|
"outputs": ["{options.outputPath}"],
|
||||||
"options": {
|
"options": {
|
||||||
"outputPath": "dist/apps/test/create-harness",
|
"outputPath": "dist/apps/testing/create-harness",
|
||||||
"index": "apps/test/create-harness/src/index.html",
|
"index": "apps/testing/create-harness/src/index.html",
|
||||||
"main": "apps/test/create-harness/src/main.ts",
|
"main": "apps/testing/create-harness/src/main.ts",
|
||||||
"polyfills": ["zone.js"],
|
"polyfills": ["zone.js"],
|
||||||
"tsConfig": "apps/test/create-harness/tsconfig.app.json",
|
"tsConfig": "apps/testing/create-harness/tsconfig.app.json",
|
||||||
"assets": [
|
"assets": [
|
||||||
"apps/test/create-harness/src/favicon.ico",
|
"apps/testing/create-harness/src/favicon.ico",
|
||||||
"apps/test/create-harness/src/assets"
|
"apps/testing/create-harness/src/assets"
|
||||||
],
|
],
|
||||||
"styles": ["apps/test/create-harness/src/styles.scss"],
|
"styles": ["apps/testing/create-harness/src/styles.scss"],
|
||||||
"scripts": []
|
"scripts": []
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
@@ -53,10 +53,10 @@
|
|||||||
"executor": "@angular-devkit/build-angular:dev-server",
|
"executor": "@angular-devkit/build-angular:dev-server",
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"browserTarget": "test-create-harness:build:production"
|
"browserTarget": "testing-create-harness:build:production"
|
||||||
},
|
},
|
||||||
"development": {
|
"development": {
|
||||||
"browserTarget": "test-create-harness:build:development"
|
"browserTarget": "testing-create-harness:build:development"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"defaultConfiguration": "development"
|
"defaultConfiguration": "development"
|
||||||
@@ -64,14 +64,14 @@
|
|||||||
"extract-i18n": {
|
"extract-i18n": {
|
||||||
"executor": "@angular-devkit/build-angular:extract-i18n",
|
"executor": "@angular-devkit/build-angular:extract-i18n",
|
||||||
"options": {
|
"options": {
|
||||||
"browserTarget": "test-create-harness:build"
|
"browserTarget": "testing-create-harness:build"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"executor": "@nx/jest:jest",
|
"executor": "@nx/jest:jest",
|
||||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||||
"options": {
|
"options": {
|
||||||
"jestConfig": "apps/test/create-harness/jest.config.ts",
|
"jestConfig": "apps/testing/create-harness/jest.config.ts",
|
||||||
"passWithNoTests": true
|
"passWithNoTests": true
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
@@ -86,8 +86,8 @@
|
|||||||
"outputs": ["{options.outputFile}"],
|
"outputs": ["{options.outputFile}"],
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
"apps/test/create-harness/**/*.ts",
|
"apps/testing/create-harness/**/*.ts",
|
||||||
"apps/test/create-harness/**/*.html"
|
"apps/testing/create-harness/**/*.html"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -8,13 +8,13 @@ NOT IMPLEMENTED YET
|
|||||||
|
|
||||||
<!-- We have a small application that send a title to a fake backend that you type inside a input.
|
<!-- We have a small application that send a title to a fake backend that you type inside a input.
|
||||||
If the title is correctly typed, you can send the request otherwise you get a nice error and the request is not sent.
|
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 test-forms`.
|
You can play with it by running : `npx nx serve testing-forms`.
|
||||||
|
|
||||||
The goal is to test this behavior with Testing library and Cypress
|
The goal is to test 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 test-forms`. 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 test your application using Testing Library. To run the test suits, you need to run `npx nx test testing-forms`. 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.
|
||||||
|
|
||||||
For testing cypress, you will execute your test inside the `child.component.cy.ts` and run `npx nx component-test test-forms` 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 test inside the `child.component.cy.ts` and run `npx nx component-test testing-forms` to execute your test suits. You can add the `--watch` flag to execute your test 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 test if you like to. -->
|
||||||
|
|
||||||
@@ -23,9 +23,9 @@ I created some `it` blocks but feel free to add more test if you like to. -->
|
|||||||
1. Fork the project
|
1. Fork the project
|
||||||
2. clone it
|
2. clone it
|
||||||
3. npm ci
|
3. npm ci
|
||||||
4. `npx nx serve test-forms` to play with the application
|
4. `npx nx serve testing-forms` to play with the application
|
||||||
5. `npx nx test test-forms` to test your application with Testing Library
|
5. `npx nx test testing-forms` to test your application with Testing Library
|
||||||
6. `npx nx component-test test-forms --watch` to test your application with Cypress
|
6. `npx nx component-test testing-forms --watch` to test your application with Cypress
|
||||||
7. _...work on it_
|
7. _...work on it_
|
||||||
8. Commit your work
|
8. Commit your work
|
||||||
9. Submit a PR with a title beginning with **Answer:20** that I will review and other dev can review.
|
9. Submit a PR with a title beginning with **Answer:20** that I will review and other dev can review.
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
export default {
|
export default {
|
||||||
displayName: 'test-modal',
|
displayName: 'testing-forms',
|
||||||
preset: '../../../jest.preset.js',
|
preset: '../../../jest.preset.js',
|
||||||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
||||||
transform: {
|
transform: {
|
||||||
@@ -1,25 +1,25 @@
|
|||||||
{
|
{
|
||||||
"name": "test-nested",
|
"name": "testing-forms",
|
||||||
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
||||||
"projectType": "application",
|
"projectType": "application",
|
||||||
"sourceRoot": "apps/test/nested/src",
|
"sourceRoot": "apps/testing/forms/src",
|
||||||
"prefix": "app",
|
"prefix": "app",
|
||||||
"targets": {
|
"targets": {
|
||||||
"build": {
|
"build": {
|
||||||
"executor": "@angular-devkit/build-angular:browser",
|
"executor": "@angular-devkit/build-angular:browser",
|
||||||
"outputs": ["{options.outputPath}"],
|
"outputs": ["{options.outputPath}"],
|
||||||
"options": {
|
"options": {
|
||||||
"outputPath": "dist/apps/test/nested",
|
"outputPath": "dist/apps/testing/forms",
|
||||||
"index": "apps/test/nested/src/index.html",
|
"index": "apps/testing/forms/src/index.html",
|
||||||
"main": "apps/test/nested/src/main.ts",
|
"main": "apps/testing/forms/src/main.ts",
|
||||||
"polyfills": ["zone.js"],
|
"polyfills": ["zone.js"],
|
||||||
"tsConfig": "apps/test/nested/tsconfig.app.json",
|
"tsConfig": "apps/testing/forms/tsconfig.app.json",
|
||||||
"inlineStyleLanguage": "scss",
|
"inlineStyleLanguage": "scss",
|
||||||
"assets": [
|
"assets": [
|
||||||
"apps/test/nested/src/favicon.ico",
|
"apps/testing/forms/src/favicon.ico",
|
||||||
"apps/test/nested/src/assets"
|
"apps/testing/forms/src/assets"
|
||||||
],
|
],
|
||||||
"styles": ["apps/test/nested/src/styles.scss"],
|
"styles": ["apps/testing/forms/src/styles.scss"],
|
||||||
"scripts": []
|
"scripts": []
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
@@ -53,10 +53,10 @@
|
|||||||
"executor": "@angular-devkit/build-angular:dev-server",
|
"executor": "@angular-devkit/build-angular:dev-server",
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"browserTarget": "test-nested:build:production"
|
"browserTarget": "testing-forms:build:production"
|
||||||
},
|
},
|
||||||
"development": {
|
"development": {
|
||||||
"browserTarget": "test-nested:build:development"
|
"browserTarget": "testing-forms:build:development"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"defaultConfiguration": "development"
|
"defaultConfiguration": "development"
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
"extract-i18n": {
|
"extract-i18n": {
|
||||||
"executor": "@angular-devkit/build-angular:extract-i18n",
|
"executor": "@angular-devkit/build-angular:extract-i18n",
|
||||||
"options": {
|
"options": {
|
||||||
"browserTarget": "test-nested:build"
|
"browserTarget": "testing-forms:build"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
@@ -72,8 +72,8 @@
|
|||||||
"outputs": ["{options.outputFile}"],
|
"outputs": ["{options.outputFile}"],
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
"apps/test/nested/**/*.ts",
|
"apps/testing/forms/**/*.ts",
|
||||||
"apps/test/nested/**/*.html"
|
"apps/testing/forms/**/*.html"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
"executor": "@nx/jest:jest",
|
"executor": "@nx/jest:jest",
|
||||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||||
"options": {
|
"options": {
|
||||||
"jestConfig": "apps/test/nested/jest.config.ts",
|
"jestConfig": "apps/testing/forms/jest.config.ts",
|
||||||
"passWithNoTests": true
|
"passWithNoTests": true
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
@@ -94,10 +94,10 @@
|
|||||||
"component-test": {
|
"component-test": {
|
||||||
"executor": "@nx/cypress:cypress",
|
"executor": "@nx/cypress:cypress",
|
||||||
"options": {
|
"options": {
|
||||||
"cypressConfig": "apps/test/nested/cypress.config.ts",
|
"cypressConfig": "apps/testing/forms/cypress.config.ts",
|
||||||
"testingType": "component",
|
"testingType": "component",
|
||||||
"skipServe": true,
|
"skipServe": true,
|
||||||
"devServerTarget": "test-nested:build"
|
"devServerTarget": "testing-forms:build"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -5,7 +5,7 @@
|
|||||||
### Run Application
|
### Run Application
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npx nx serve test-harness
|
npx nx serve testing-harness
|
||||||
```
|
```
|
||||||
|
|
||||||
### Documentation and Instruction
|
### Documentation and Instruction
|
||||||
21
apps/testing/harness/jest.config.ts
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
export default {
|
||||||
|
displayName: 'testing-harness',
|
||||||
|
preset: '../../../jest.preset.js',
|
||||||
|
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
||||||
|
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',
|
||||||
|
],
|
||||||
|
};
|
||||||
@@ -1,25 +1,25 @@
|
|||||||
{
|
{
|
||||||
"name": "test-checkbox",
|
"name": "testing-harness",
|
||||||
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
||||||
"projectType": "application",
|
"projectType": "application",
|
||||||
"prefix": "app",
|
"prefix": "app",
|
||||||
"sourceRoot": "apps/test/checkbox/src",
|
"sourceRoot": "apps/testing/harness/src",
|
||||||
"tags": [],
|
"tags": [],
|
||||||
"targets": {
|
"targets": {
|
||||||
"build": {
|
"build": {
|
||||||
"executor": "@angular-devkit/build-angular:browser",
|
"executor": "@angular-devkit/build-angular:browser",
|
||||||
"outputs": ["{options.outputPath}"],
|
"outputs": ["{options.outputPath}"],
|
||||||
"options": {
|
"options": {
|
||||||
"outputPath": "dist/apps/test/checkbox",
|
"outputPath": "dist/apps/testing/harness",
|
||||||
"index": "apps/test/checkbox/src/index.html",
|
"index": "apps/testing/harness/src/index.html",
|
||||||
"main": "apps/test/checkbox/src/main.ts",
|
"main": "apps/testing/harness/src/main.ts",
|
||||||
"polyfills": ["zone.js"],
|
"polyfills": ["zone.js"],
|
||||||
"tsConfig": "apps/test/checkbox/tsconfig.app.json",
|
"tsConfig": "apps/testing/harness/tsconfig.app.json",
|
||||||
"assets": [
|
"assets": [
|
||||||
"apps/test/checkbox/src/favicon.ico",
|
"apps/testing/harness/src/favicon.ico",
|
||||||
"apps/test/checkbox/src/assets"
|
"apps/testing/harness/src/assets"
|
||||||
],
|
],
|
||||||
"styles": ["apps/test/checkbox/src/styles.scss"],
|
"styles": ["apps/testing/harness/src/styles.scss"],
|
||||||
"scripts": []
|
"scripts": []
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
@@ -53,10 +53,10 @@
|
|||||||
"executor": "@angular-devkit/build-angular:dev-server",
|
"executor": "@angular-devkit/build-angular:dev-server",
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"browserTarget": "test-checkbox:build:production"
|
"browserTarget": "testing-harness:build:production"
|
||||||
},
|
},
|
||||||
"development": {
|
"development": {
|
||||||
"browserTarget": "test-checkbox:build:development"
|
"browserTarget": "testing-harness:build:development"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"defaultConfiguration": "development"
|
"defaultConfiguration": "development"
|
||||||
@@ -64,24 +64,14 @@
|
|||||||
"extract-i18n": {
|
"extract-i18n": {
|
||||||
"executor": "@angular-devkit/build-angular:extract-i18n",
|
"executor": "@angular-devkit/build-angular:extract-i18n",
|
||||||
"options": {
|
"options": {
|
||||||
"browserTarget": "test-checkbox:build"
|
"browserTarget": "testing-harness:build"
|
||||||
}
|
|
||||||
},
|
|
||||||
"lint": {
|
|
||||||
"executor": "@nx/linter:eslint",
|
|
||||||
"outputs": ["{options.outputFile}"],
|
|
||||||
"options": {
|
|
||||||
"lintFilePatterns": [
|
|
||||||
"apps/test/checkbox/**/*.ts",
|
|
||||||
"apps/test/checkbox/**/*.html"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"executor": "@nx/jest:jest",
|
"executor": "@nx/jest:jest",
|
||||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||||
"options": {
|
"options": {
|
||||||
"jestConfig": "apps/test/checkbox/jest.config.ts",
|
"jestConfig": "apps/testing/harness/jest.config.ts",
|
||||||
"passWithNoTests": true
|
"passWithNoTests": true
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
@@ -90,6 +80,16 @@
|
|||||||
"codeCoverage": true
|
"codeCoverage": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"executor": "@nx/linter:eslint",
|
||||||
|
"outputs": ["{options.outputFile}"],
|
||||||
|
"options": {
|
||||||
|
"lintFilePatterns": [
|
||||||
|
"apps/testing/harness/**/*.ts",
|
||||||
|
"apps/testing/harness/**/*.html"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -5,7 +5,7 @@
|
|||||||
### Run Application
|
### Run Application
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npx nx serve test-input-output
|
npx nx serve testing-input-output
|
||||||
```
|
```
|
||||||
|
|
||||||
### Documentation and Instruction
|
### Documentation and Instruction
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
export default {
|
export default {
|
||||||
displayName: 'test-create-harness',
|
displayName: 'testing-input-output',
|
||||||
preset: '../../../jest.preset.js',
|
preset: '../../../jest.preset.js',
|
||||||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
||||||
transform: {
|
transform: {
|
||||||
@@ -1,25 +1,25 @@
|
|||||||
{
|
{
|
||||||
"name": "test-input-output",
|
"name": "testing-input-output",
|
||||||
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
||||||
"projectType": "application",
|
"projectType": "application",
|
||||||
"sourceRoot": "apps/test/input-output/src",
|
"sourceRoot": "apps/testing/input-output/src",
|
||||||
"prefix": "app",
|
"prefix": "app",
|
||||||
"targets": {
|
"targets": {
|
||||||
"build": {
|
"build": {
|
||||||
"executor": "@angular-devkit/build-angular:browser",
|
"executor": "@angular-devkit/build-angular:browser",
|
||||||
"outputs": ["{options.outputPath}"],
|
"outputs": ["{options.outputPath}"],
|
||||||
"options": {
|
"options": {
|
||||||
"outputPath": "dist/apps/test/input-output",
|
"outputPath": "dist/apps/testing/input-output",
|
||||||
"index": "apps/test/input-output/src/index.html",
|
"index": "apps/testing/input-output/src/index.html",
|
||||||
"main": "apps/test/input-output/src/main.ts",
|
"main": "apps/testing/input-output/src/main.ts",
|
||||||
"polyfills": ["zone.js"],
|
"polyfills": ["zone.js"],
|
||||||
"tsConfig": "apps/test/input-output/tsconfig.app.json",
|
"tsConfig": "apps/testing/input-output/tsconfig.app.json",
|
||||||
"inlineStyleLanguage": "scss",
|
"inlineStyleLanguage": "scss",
|
||||||
"assets": [
|
"assets": [
|
||||||
"apps/test/input-output/src/favicon.ico",
|
"apps/testing/input-output/src/favicon.ico",
|
||||||
"apps/test/input-output/src/assets"
|
"apps/testing/input-output/src/assets"
|
||||||
],
|
],
|
||||||
"styles": ["apps/test/input-output/src/styles.scss"],
|
"styles": ["apps/testing/input-output/src/styles.scss"],
|
||||||
"scripts": []
|
"scripts": []
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
@@ -53,10 +53,10 @@
|
|||||||
"executor": "@angular-devkit/build-angular:dev-server",
|
"executor": "@angular-devkit/build-angular:dev-server",
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"browserTarget": "test-input-output:build:production"
|
"browserTarget": "testing-input-output:build:production"
|
||||||
},
|
},
|
||||||
"development": {
|
"development": {
|
||||||
"browserTarget": "test-input-output:build:development"
|
"browserTarget": "testing-input-output:build:development"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"defaultConfiguration": "development"
|
"defaultConfiguration": "development"
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
"extract-i18n": {
|
"extract-i18n": {
|
||||||
"executor": "@angular-devkit/build-angular:extract-i18n",
|
"executor": "@angular-devkit/build-angular:extract-i18n",
|
||||||
"options": {
|
"options": {
|
||||||
"browserTarget": "test-input-output:build"
|
"browserTarget": "testing-input-output:build"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
@@ -72,8 +72,8 @@
|
|||||||
"outputs": ["{options.outputFile}"],
|
"outputs": ["{options.outputFile}"],
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
"apps/test/input-output/**/*.ts",
|
"apps/testing/input-output/**/*.ts",
|
||||||
"apps/test/input-output/**/*.html"
|
"apps/testing/input-output/**/*.html"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
"executor": "@nx/jest:jest",
|
"executor": "@nx/jest:jest",
|
||||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||||
"options": {
|
"options": {
|
||||||
"jestConfig": "apps/test/input-output/jest.config.ts",
|
"jestConfig": "apps/testing/input-output/jest.config.ts",
|
||||||
"passWithNoTests": true
|
"passWithNoTests": true
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
@@ -94,10 +94,10 @@
|
|||||||
"component-test": {
|
"component-test": {
|
||||||
"executor": "@nx/cypress:cypress",
|
"executor": "@nx/cypress:cypress",
|
||||||
"options": {
|
"options": {
|
||||||
"cypressConfig": "apps/test/input-output/cypress.config.ts",
|
"cypressConfig": "apps/testing/input-output/cypress.config.ts",
|
||||||
"testingType": "component",
|
"testingType": "component",
|
||||||
"skipServe": true,
|
"skipServe": true,
|
||||||
"devServerTarget": "test-input-output:build"
|
"devServerTarget": "testing-input-output:build"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |