From 165f35055f3c5a721d6647745da7107e6f1e7eff Mon Sep 17 00:00:00 2001 From: Patti Shin Date: Tue, 15 Aug 2023 13:22:58 -0700 Subject: [PATCH] chore: shifting test http region tags to show imports (#3405) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: shifting region tags to show imports tps could miss * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * refactor: wrapping getFunction import under functions_http_unit_test region tag --------- Co-authored-by: Owl Bot --- .../helloworld/helloworldHttp/test/sample.unit.http.test.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/functions/helloworld/helloworldHttp/test/sample.unit.http.test.js b/functions/helloworld/helloworldHttp/test/sample.unit.http.test.js index 6997f66a89..f1ee48c365 100644 --- a/functions/helloworld/helloworldHttp/test/sample.unit.http.test.js +++ b/functions/helloworld/helloworldHttp/test/sample.unit.http.test.js @@ -13,7 +13,10 @@ // limitations under the License. // FF testing layer for declarative signatures + +// [START functions_http_unit_test] const {getFunction} = require('@google-cloud/functions-framework/testing'); +// [END functions_http_unit_test] describe('functions_helloworld_http', () => { // [START functions_http_unit_test] @@ -41,6 +44,7 @@ describe('functions_helloworld_http', () => { assert.strictEqual(mocks.res.send.calledOnceWith('Hello World!'), true); }); // [END functions_http_unit_test] + it('helloHttp: should print a name with query', () => { const mocks = getMocks(); mocks.req.query = {name: 'John'};