Skip to content

Commit 4ad0127

Browse files
committed
Fix package et cleanup imports
1 parent bd8b000 commit 4ad0127

6 files changed

Lines changed: 5 additions & 12 deletions

File tree

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,5 @@ The app is running on `http://localhost:4200/` and will automatically reload if
4040

4141
Run `ng test` for unit tests.
4242

43-
Run `ng e2e` for end-to-end tests with Protractor.
44-
4543
Run `npx cypress open` for end-to-end tests with Cypress.
4644

cypress.config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
export default {
22
e2e: {
3-
// We've imported your old cypress plugins here.
4-
// You may want to clean this up later by importing these.
53
setupNodeEvents(on, config) {
64
return require('./cypress/plugins/index.js')(on, config)
75
},

debug.log

Lines changed: 0 additions & 2 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@angular/compiler": "~11.0.7",
1515
"@angular/core": "~11.0.7",
1616
"@angular/forms": "~11.0.7",
17-
"@angular/localize": "^11.0.7",
17+
"@angular/localize": "~11.0.7",
1818
"@angular/platform-browser": "~11.0.7",
1919
"@angular/platform-browser-dynamic": "~11.0.7",
2020
"@angular/router": "~11.0.7",

src/app/products/product-insert/product-insert.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ReactiveFormsModule, FormsModule } from "@angular/forms";
33
import { ProductService } from 'src/app/services/product.service';
44
import { Product } from '../product.interface';
55
import { ProductInsertComponent } from "./product-insert.component";
6-
import { Spy, createSpyFromClass } from 'jasmine-auto-spies';
6+
import { Spy, provideAutoSpy } from 'jasmine-auto-spies';
77
import { Router } from '@angular/router';
88

99
// Declare a mock for the Router service
@@ -22,7 +22,7 @@ describe('Product Insert Component (Reactive Form)', () => {
2222
imports: [ReactiveFormsModule, FormsModule],
2323
declarations: [ProductInsertComponent],
2424
providers: [
25-
{ provide: ProductService, useValue: createSpyFromClass(ProductService) },
25+
provideAutoSpy(ProductService), // same as { provide: ProductService, useValue: createSpyFromClass(ProductService) },
2626
{ provide: Router, useClass: RouterMock }
2727
]
2828
});

src/app/products/product-list/product-list.component.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
import { TestBed, ComponentFixture, fakeAsync, tick } from '@angular/core/testing';
1+
import { TestBed, ComponentFixture } from '@angular/core/testing';
22
import { ProductService } from 'src/app/services/product.service';
33
import { Product } from '../product.interface';
44
import { Spy, provideAutoSpy, createSpyFromClass } from 'jasmine-auto-spies';
5-
import { ActivatedRoute, Router } from '@angular/router';
5+
import { Router } from '@angular/router';
66
import { FavouriteService } from 'src/app/services/favourite.service';
77
import { ProductListComponent } from './product-list.component';
88
import { DebugElement, Pipe } from '@angular/core';
99
import { By } from '@angular/platform-browser';
10-
import { OrderBy } from '../orderBy.pipe';
1110

1211
export function mockPipe(options: Pipe): Pipe {
1312
const metadata: Pipe = {

0 commit comments

Comments
 (0)