問題タブ [loopback4]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
sinon - ループバック 4: Sinon とインジェクションに関するテストの問題
ループバックを使用してテストを実行しようとしています。このテストには google API の呼び出しが含まれており、Sinon でそれをモックしたいと考えています。
コントローラー:
[...]
コンストラクターで:
[...]
エンドポイントで:
テスト:
この方法をどのようにテストできますか? ループバックでコンストラクターにインジェクションを含むエンドポイントをテストするにはどうすればよいですか? 助けが必要です。