fix: misspelled word (#115)
Signed-off-by: Helio Frota <00hf11@gmail.com>
This commit is contained in:
parent
f30c814a09
commit
53524acb0e
|
@ -121,7 +121,7 @@ const v1 = require("cloudevents-sdk/v1");
|
||||||
*/
|
*/
|
||||||
let myevent = v1.event()
|
let myevent = v1.event()
|
||||||
.type("com.github.pull.create")
|
.type("com.github.pull.create")
|
||||||
.source("urn:event:from:myapi/resourse/123");
|
.source("urn:event:from:myapi/resource/123");
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Formatting
|
#### Formatting
|
||||||
|
@ -134,7 +134,7 @@ const v1 = require("cloudevents-sdk/v1");
|
||||||
*/
|
*/
|
||||||
let myevent = v1.event()
|
let myevent = v1.event()
|
||||||
.type("com.github.pull.create")
|
.type("com.github.pull.create")
|
||||||
.source("urn:event:from:myapi/resourse/123");
|
.source("urn:event:from:myapi/resource/123");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Format the payload and return it
|
* Format the payload and return it
|
||||||
|
@ -152,7 +152,7 @@ const v1 = require("cloudevents-sdk/v1");
|
||||||
*/
|
*/
|
||||||
let myevent = v1.event()
|
let myevent = v1.event()
|
||||||
.type("com.github.pull.create")
|
.type("com.github.pull.create")
|
||||||
.source("urn:event:from:myapi/resourse/123");
|
.source("urn:event:from:myapi/resource/123");
|
||||||
|
|
||||||
// The binding configuration using POST
|
// The binding configuration using POST
|
||||||
let config = {
|
let config = {
|
||||||
|
|
|
@ -430,7 +430,7 @@ describe("HTTP Transport Binding Binary Receiver for CloudEvents v1.0", () => {
|
||||||
|
|
||||||
it("Should accept 'extension1'", () => {
|
it("Should accept 'extension1'", () => {
|
||||||
// setup
|
// setup
|
||||||
const extension1 = "mycuston-ext1";
|
const extension1 = "mycustom-ext1";
|
||||||
const payload = {
|
const payload = {
|
||||||
data: "dataString"
|
data: "dataString"
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,7 +10,7 @@ const HTTPStructuredReceiver =
|
||||||
const receiver = new HTTPStructuredReceiver();
|
const receiver = new HTTPStructuredReceiver();
|
||||||
|
|
||||||
const type = "com.github.pull.create";
|
const type = "com.github.pull.create";
|
||||||
const source = "urn:event:from:myapi/resourse/123";
|
const source = "urn:event:from:myapi/resource/123";
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
const dataschema = "http://cloudevents.io/schema.json";
|
const dataschema = "http://cloudevents.io/schema.json";
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ describe("HTTP Transport Binding Structured Receiver for CloudEvents v1.0",
|
||||||
|
|
||||||
it("Should accept 'extension1'", () => {
|
it("Should accept 'extension1'", () => {
|
||||||
// setup
|
// setup
|
||||||
const extension1 = "mycuston-ext1";
|
const extension1 = "mycustom-ext1";
|
||||||
const payload = v1.event()
|
const payload = v1.event()
|
||||||
.type(type)
|
.type(type)
|
||||||
.source(source)
|
.source(source)
|
||||||
|
@ -154,7 +154,7 @@ describe("HTTP Transport Binding Structured Receiver for CloudEvents v1.0",
|
||||||
.to.equal(extension1);
|
.to.equal(extension1);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Should parse 'data' stringfied json to json object", () => {
|
it("Should parse 'data' stringified json to json object", () => {
|
||||||
// setup
|
// setup
|
||||||
const payload = v1.event()
|
const payload = v1.event()
|
||||||
.type(type)
|
.type(type)
|
||||||
|
|
|
@ -11,7 +11,7 @@ const {
|
||||||
} = require("../v1/index.js");
|
} = require("../v1/index.js");
|
||||||
|
|
||||||
const type = "com.github.pull.create";
|
const type = "com.github.pull.create";
|
||||||
const source = "urn:event:from:myapi/resourse/123";
|
const source = "urn:event:from:myapi/resource/123";
|
||||||
const contentType = "application/cloudevents+json; charset=utf-8";
|
const contentType = "application/cloudevents+json; charset=utf-8";
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
const dataschema = "http://cloudevents.io/schema.json";
|
const dataschema = "http://cloudevents.io/schema.json";
|
||||||
|
|
|
@ -6,7 +6,7 @@ const { asBase64 } = require("../lib/utils/fun.js");
|
||||||
|
|
||||||
const id = uuidv4();
|
const id = uuidv4();
|
||||||
const type = "com.github.pull.create";
|
const type = "com.github.pull.create";
|
||||||
const source = "urn:event:from:myapi/resourse/123";
|
const source = "urn:event:from:myapi/resource/123";
|
||||||
const time = new Date();
|
const time = new Date();
|
||||||
const dataschema = "http://example.com/registry/myschema.json";
|
const dataschema = "http://example.com/registry/myschema.json";
|
||||||
const dataContentType = "application/json";
|
const dataContentType = "application/json";
|
||||||
|
@ -63,7 +63,7 @@ describe("CloudEvents Spec v1.0", () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("Extenstions Constraints", () => {
|
describe("Extensions Constraints", () => {
|
||||||
it("should be ok when type is 'boolean'", () => {
|
it("should be ok when type is 'boolean'", () => {
|
||||||
cloudevent.addExtension("ext-boolean", true);
|
cloudevent.addExtension("ext-boolean", true);
|
||||||
expect(cloudevent.spec.payload["ext-boolean"])
|
expect(cloudevent.spec.payload["ext-boolean"])
|
||||||
|
@ -126,7 +126,7 @@ describe("CloudEvents Spec v1.0", () => {
|
||||||
cloudevent.spec.payload.id = id;
|
cloudevent.spec.payload.id = id;
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should throw an erro when is empty", () => {
|
it("should throw an error when is empty", () => {
|
||||||
cloudevent.spec.payload.id = "";
|
cloudevent.spec.payload.id = "";
|
||||||
expect(cloudevent.format.bind(cloudevent))
|
expect(cloudevent.format.bind(cloudevent))
|
||||||
.to
|
.to
|
||||||
|
|
Loading…
Reference in New Issue