firebase / firebase/quickstart-testing
Example for asserting `HttpsError` thrown by cloud function
オープン
- 主要言語
- JavaScript
- スター
- 368
- フォーク
- 125
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
It would be really nice to have an example how to assert `HttpsError`, which are thrown by a cloud function.
```ts
exports.testCallable = functions.https.onCall((data, context) => {
console.log('testCallable');
return new functions.https.HttpsError('ok', 'this is an error');
})
```
How to write a test, that a `HttpsError` with the message `this is an error` was thrown?
コントリビューションガイド
調査の方向性
提供されているtestCallable cloud functionから始めて、リポジトリのcallable functionテストのエントリーポイントを調べてください。HttpsErrorのメッセージをアサートする方法を示す例を追加し、ドキュメント化されたテストが期待されるエラーと成功した呼び出しを区別していることを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- firebase, javascript
- 領域
- backend, testing
- issue の種類
- ドキュメント
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100