-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Is there an example in here for running an Angular unit test?
I tried adding the BreezeBridgeHttpClientModule to the imports of the testbed but the test seems to be trying to initiate real requests rather than mocking them.
Test fixture snippet:
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [FormsModule, HttpClientModule, RouterTestingModule, BreezeBridgeHttpClientModule],
declarations: [SearchResultsComponent]
})
.compileComponents();
}));
Test result snippet:
Failed: Uncaught (in promise): Error: Metadata query failed for: service/Metadata; NOT FOUND
Error: Metadata query failed for: service/Metadata; NOT FOUND
at createError (http://localhost:9876/_karma_webpack_/webpack:/node_modules/breeze-client/breeze.debug.js:16247:1)
at handleHttpError (http://localhost:9876/_karma_webpack_/webpack:/node_modules/breeze-client/breeze.debug.js:16237:1)
at Object.error (http://localhost:9876/_karma_webpack_/webpack:/node_modules/breeze-client/breeze.debug.js:16036:1)
at SafeSubscriber.errorFn [as _error] (http://localhost:9876/_karma_webpack_/webpack:/node_modules/breeze-bridge2-angular/index.js:172:1)
at SafeSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.__tryOrUnsub (http://localhost:9876/_karma_webpack_/webpack:/node_modules/rxjs/_esm5/internal/Subscriber.js:195:1)
at SafeSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.error (http://localhost:9876/_karma_webpack_/webpack:/node_modules/rxjs/_esm5/internal/Subscriber.js:146:1)
at Subscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._error (http://localhost:9876/_karma_webpack_/webpack:/node_modules/rxjs/_esm5/internal/Subscriber.js:80:1)
at Subscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.error (http://localhost:9876/_karma_webpack_/webpack:/node_modules/rxjs/_esm5/internal/Subscriber.js:60:1)
at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._error (http://localhost:9876/_karma_webpack_/webpack:/node_modules/rxjs/_esm5/internal/Subscriber.js:80:1)
at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.error (http://localhost:9876/_karma_webpack_/webpack:/node_modules/rxjs/_esm5/internal/Subscriber.js:60:1)
Metadata
Metadata
Assignees
Labels
No labels