Skip to content

Commit

Permalink
chore: shifting test http region tags to show imports (#3405)
Browse files Browse the repository at this point in the history
* 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 <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
pattishin and gcf-owl-bot[bot] authored Aug 15, 2023
1 parent cbf3e6c commit 165f350
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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'};
Expand Down

0 comments on commit 165f350

Please sign in to comment.