Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kriese-Dominik-Allianz committed Apr 10, 2024
1 parent 3067e62 commit f3e0392
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 30 deletions.
6 changes: 3 additions & 3 deletions apps/basics/src/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'jest-preset-angular/setup-jest';
import { ngMocks } from 'ng-mocks';
import "jest-preset-angular/setup-jest";
import { ngMocks } from "ng-mocks";

ngMocks.autoSpy('jest');
ngMocks.autoSpy("jest");
16 changes: 13 additions & 3 deletions apps/basics/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"target": "ES2016",
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": [
"jest",
"node"
]
},
"files": ["src/test-setup.ts"],
"include": ["**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
"files": [
"src/test-setup.ts"
],
"include": [
"**/*.test.ts",
"**/*.spec.ts",
"**/*.d.ts"
]
}
17 changes: 14 additions & 3 deletions apps/ngrx/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"target": "ES2016",
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": [
"jest",
"node"
]
},
"files": ["src/test-setup.ts"],
"include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
"files": [
"src/test-setup.ts"
],
"include": [
"jest.config.ts",
"**/*.test.ts",
"**/*.spec.ts",
"**/*.d.ts"
]
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Navbar: A user viewing the navbar should have a consistent layout 1`] = `
<mock-render
__ngContext__="0"
>
<mock-render>
<cntws-navbar>
<mat-toolbar
class="w-screen"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`A user triggering an error can get it displayed 1`] = `
<mock-render
__ngContext__="0"
>
<mock-render>
<cntws-error-message>
<mat-card>
<mat-card-content>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`A loading component should render a spinner 1`] = `
<mock-render
__ngContext__="0"
>
<mock-render>
<cntws-loading>
<mat-spinner />
</cntws-loading>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Location: A user viewing the component should see a consistent layout if no location is saved 1`] = `
<mock-render
__ngContext__={[Function Number]}
>
<mock-render>
<cntws-location>
<mat-card>
<mat-card-content>
Expand Down Expand Up @@ -39,9 +37,7 @@ exports[`Location: A user viewing the component should see a consistent layout i
`;

exports[`Location: A user viewing the component should see a consistent layout with their saved location 1`] = `
<mock-render
__ngContext__={[Function Number]}
>
<mock-render>
<cntws-location>
<mat-card>
<mat-card-subtitle>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Weather Results: A user viewing their results should see a consistent layout 1`] = `
<mock-render
__ngContext__="0"
>
<mock-render>
<cntws-weather-results>
<div
class="grid grid-cols-3 gap-4"
Expand Down
17 changes: 14 additions & 3 deletions libs/weather/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"target": "ES2016",
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
"types": [
"jest",
"node"
]
},
"files": ["src/test-setup.ts"],
"include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
"files": [
"src/test-setup.ts"
],
"include": [
"jest.config.ts",
"**/*.test.ts",
"**/*.spec.ts",
"**/*.d.ts"
]
}

0 comments on commit f3e0392

Please sign in to comment.