-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added tests for serverunarydecorator
- Loading branch information
1 parent
1dad6a0
commit 8e63409
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const object = {}; | ||
const originalCall = { | ||
hello: "hello" | ||
}; | ||
const clientUnaryDecorator = require("../../../lib/callFactories/callDecorators/clientUnaryDecorator"); | ||
|
||
describe("Client unary decorator tests.", () => { | ||
describe("decorator adds the right methods", () => { | ||
//adds properties | ||
beforeEach(() => { | ||
clientUnaryDecorator(object, originalCall); | ||
}); | ||
it("Has an on property", () => { | ||
expect(object.hasOwnProperty("on")).toBeTruthy(); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const object = {}; | ||
const originalCall = { | ||
hello: "hello" | ||
}; | ||
const clientUnaryDecorator = require("../../../lib/callFactories/callDecorators/clientUnaryDecorator"); | ||
|
||
describe("Client unary decorator tests.", () => { | ||
describe("decorator adds the right methods", () => { | ||
//adds properties | ||
beforeEach(() => { | ||
clientUnaryDecorator(object, originalCall); | ||
}); | ||
it("Has an on property", () => { | ||
expect(object.hasOwnProperty("on")).toBeTruthy(); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const object = {}; | ||
const originalCall = { | ||
hello: "hello" | ||
}; | ||
const serverUnaryDecorator = require("../../../lib/callFactories/callDecorators/serverUnaryDecorator"); | ||
|
||
describe("Server unary decorator tests.", () => { | ||
describe("decorator adds the right methods", () => { | ||
//adds properties | ||
beforeEach(() => { | ||
serverUnaryDecorator(object, originalCall); | ||
}); | ||
it("Has an on property", () => { | ||
expect(object.hasOwnProperty("set")).toBeTruthy(); | ||
}); | ||
it("Has a catch property", () => { | ||
expect(object.hasOwnProperty("send")).toBeTruthy(); | ||
}); | ||
it("Has a throw property", () => { | ||
expect(object.hasOwnProperty("throw")).toBeTruthy(); | ||
}); | ||
}); | ||
}); |