Skip to content

Commit

Permalink
fix: minor typos in node template docs (#351)
Browse files Browse the repository at this point in the history
  • Loading branch information
helio-frota committed May 18, 2021
1 parent 2a07240 commit ea0a75a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion templates/node/events/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ check for this in the function and it will respond just fine to plain vanilla
incoming HTTP requests. Additionally, this example function is written
asynchronously, returning a `Promise`. If your function does not perform any
asynchronous execution, you can safely remove the `async` keyword from the
function, and return raw values intead of a `Promise`.
function, and return raw values instead of a `Promise`.

## Local execution

Expand Down
2 changes: 1 addition & 1 deletion templates/node/events/test/unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test('Unit: handles a valid event', t => {

const mockContext = new MockContext(cloudevent);

// Invoke the function with the valid event, which should compelte without error.
// Invoke the function with the valid event, which should complete without error.
const result = func(mockContext, data);
t.ok(result);
t.equal(result.body, data);
Expand Down
2 changes: 1 addition & 1 deletion templates/node/http/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function handlePost(context) {

/**
* An HTTP handling function which reads the HTTP request
* method from the context object and invokes the apporpriate
* method from the context object and invokes the appropriate
* request handler.
* @param {Context} context a context object containing the HTTP request data
*/
Expand Down
4 changes: 2 additions & 2 deletions templates/node/http/test/unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ const fixture = { log: { info: console.log } };

test('Unit: handles an HTTP GET', t => {
t.plan(1);
// Invoke the function, which should compelte without error.
// Invoke the function, which should complete without error.
const result = func({ ...fixture, method: 'GET', query: { name: 'tiger' } });
t.deepEqual(result, { query: { name: 'tiger' }, name: 'tiger' });
t.end();
});

test('Unit: handles an HTTP POST', t => {
t.plan(1);
// Invoke the function, which should compelte without error.
// Invoke the function, which should complete without error.
const result = func({ ...fixture, method: 'POST', body: { name: 'tiger' } });
t.deepEqual(result, { body: { name: 'tiger' }, name: 'tiger' });
t.end();
Expand Down

0 comments on commit ea0a75a

Please sign in to comment.