Angular 2 MockBackend を使用して結果をモックし、メソッドの種類 (Post|Get|...) に応じて応答を設定します。例えば:
if (connection.request.url.endsWith('/api/authenticate') && connection.request.method === RequestMethod.Post) {
しかし、コンパイル中にエラーが発生しました。例えば:
[default] ...
Operator '===' cannot be applied to types 'RequestMethod.Post' and 'RequestMethod.Get'.