dart - MockHttpBackend - Unexpected request -


I have an exam (using jasmine syntax from Angular Project)

 

As a result

  test failed: caught [unimportant error, [unexpected request: GET / url not required expected more], # 0> MockHttpBackend.call (package: angular / duplicate / http_backend. Dart: 224: 5) # 1 MockHttpBackend .request (Package: Angular / Fake / http_backend.dart: 137: 9)  

Any ideas what I am doing wrong?

After the

look at that code snippet:

 < Code> zero Fake Test () {Description ("MockHttpBackend", () {TestBed _; Scope area; Hpp htp; MockHttp backend; BeforeEach (setUpInjector); First of all (module (Module M) {m.type (HTTP backend, implemented: MockHttpBackend);}); First of all (injection (Test Beed TB) = & gt; _ = tb); First of all (inject ((scope s) => scope = s)); First of all (injection (HTTP H) => HTP = H); First of all (Inject ((backpack back (http backend) = & gt; backend = h); ('original request should', () {backend.expect ('GET', '/ url'). ; Http (url: '/ url', method: 'GET');});}); }  

What are you looking for?

Regards, Sergey.


Comments