// assertions in the response object to be evaluated.
    myFunctions.addMessage(req, res);
    
    [test.offline.js](https://github.com/firebase/functions-samples/blob/071ac156f63dbc4fcef5adc492d912c51949978c/Node-1st-gen/quickstarts/uppercase-rtdb/functions/test/test.offline.js#L122-L136)

##  Test cleanup

At the very end of your test code, call the cleanup function. This unsets
environment variables that the SDK set when it was initialized, and deletes
Firebase apps that may have been created if you used the SDK to create a real
time database ` DataSnapshot ` or Firestore ` DocumentSnapshot ` .

    
    
    test.cleanup();
    

##  Review complete examples and learn more

You can review the complete examples on the Firebase GitHub repository.

  * [ Testing Realtime Database and HTTP Functions in Online Mode ](https://github.com/firebase/functions-samples/tree/main/Node-1st-gen/quickstarts/uppercase-rtdb/functions/test/test.online.js)
  * [ Testing Realtime Database and HTTP Functions in Offline Mode ](https://github.com/firebase/functions-samples/tree/main/Node-1st-gen/quickstarts/uppercase-rtdb/functions/test/test.offline.js)

To learn more, refer to the [ API reference ](/docs/reference/functions/test)
for ` firebase-functions-test ` .

Send feedback

Except as otherwise noted, the content of this page is licensed under the [
Creative Commons Attribution 4.0 License
](https://creativecommons.org/licenses/by/4.0/) , and code samples are
licensed under the [ Apache 2.0 License
](https://www.apache.org/licenses/LICENSE-2.0) . For details, see the [ Google
Developers Site Policies ](https://developers.google.com/site-policies) . Java
is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-04-17 UTC.

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing
the information I need" },{ "type": "thumb-down", "id":
"tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{
"type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type":
"thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{
"type": "thumb-down", "id": "otherDown", "label":"Other" }]  [{ "type":
"thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type":
"thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type":
"thumb-up", "id": "otherUp", "label":"Other" }]  Need to tell us more?

  * ###  Learn 

    * [ Guides ](/docs/guides/)
    * [ Reference ](/docs/reference/)
    * [ Samples ](/docs/samples/)
    * [ Libraries ](/docs/libraries/)
    * [ GitHub ](//github.com/firebase/)
  * ###  Stay connected 

    * [ Blog ](//firebase.blog)
    * [ Firebase Summit ](/summit/)
    * [ Twitter ](//twitter.com/Firebase)
    * [ YouTube ](//www.youtube.com/user/Firebase)
  * ###  Support 

    * [ Contact support ](/support/)
    * [ Stack Overflow ](//stackoverflow.com/questions/tagged/firebase)
    * [ Slack community ](//firebase.community/)
    * [ Google group ](//groups.google.com/forum/#!forum/firebase-talk)
    * [ Release notes ](/support/releases)
    * [ FAQs ](/support/faq/)

[ ![Google Developers](https://www.gstatic.com/devrel-
devsite/prod/v66c4dc9b65fea2172a0927d7be81b5b5d946ea60fc02578dd7c264b2c2852152/firebase/images/lockup-
google-for-developers.svg) ](https://developers.google.com/)

  * [ Android ](//developer.android.com)
  * [ Chrome ](//developer.chrome.com/home)
  * [ Firebase ](//firebase.google.com)
  * [ Google Cloud Platform ](//cloud.google.com)
  * [ All products ](//developers.google.com/products/)

  * [ Terms ](/terms/)
  * [ Privacy ](//policies.google.com/privacy)
  * Manage cookies 

  * English 
  * Deutsch 
  * Español 
  * Español – América Latina 
  * Français 
  * Indonesia 
  * Italiano 
  * Polski 
  * Português 
  * Português – Brasil 
  * Tiếng Việt 
  * Türkçe 
  * Русский 
  * עברית 
  * العربيّة 
  * فارسی 
  * हिंदी 
  * বাংলা 
  * ภาษาไทย 
  * 中文 – 简体 
  * 中文 – 繁體 
  * 日本語 
  * 한국어