aboutsummaryrefslogtreecommitdiff
path: root/test/shared/operations.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/shared/operations.test.ts')
-rw-r--r--test/shared/operations.test.ts46
1 files changed, 26 insertions, 20 deletions
diff --git a/test/shared/operations.test.ts b/test/shared/operations.test.ts
index fbb6193..94986ac 100644
--- a/test/shared/operations.test.ts
+++ b/test/shared/operations.test.ts
@@ -1,8 +1,8 @@
-import * as operations from 'shared/operations';
+import * as operations from "shared/operations";
-describe('operations', () => {
- describe('#valueOf', () => {
- it('returns an Operation', () => {
+describe("operations", () => {
+ describe("#valueOf", () => {
+ it("returns an Operation", () => {
const op: operations.Operation = operations.valueOf({
type: operations.SCROLL_VERTICALLY,
count: 10,
@@ -11,31 +11,37 @@ describe('operations', () => {
expect(op.count).to.equal(10);
});
- it('throws an Error on missing required parameter', () => {
- expect(() => operations.valueOf({
- type: operations.SCROLL_VERTICALLY,
- })).to.throw(TypeError);
+ it("throws an Error on missing required parameter", () => {
+ expect(() =>
+ operations.valueOf({
+ type: operations.SCROLL_VERTICALLY,
+ })
+ ).to.throw(TypeError);
});
- it('fills default valus of optional parameter', () => {
+ it("fills default valus of optional parameter", () => {
const op: operations.Operation = operations.valueOf({
type: operations.COMMAND_SHOW_OPEN,
});
- expect(op.type).to.equal(operations.COMMAND_SHOW_OPEN)
+ expect(op.type).to.equal(operations.COMMAND_SHOW_OPEN);
expect(op.alter).to.be.false;
});
- it('throws an Error on mismatch of parameter', () => {
- expect(() => operations.valueOf({
- type: operations.SCROLL_VERTICALLY,
- count: '10',
- })).to.throw(TypeError);
+ it("throws an Error on mismatch of parameter", () => {
+ expect(() =>
+ operations.valueOf({
+ type: operations.SCROLL_VERTICALLY,
+ count: "10",
+ })
+ ).to.throw(TypeError);
- expect(() => valueOf({
- type: operations.COMMAND_SHOW_OPEN,
- alter: 'true',
- })).to.throw(TypeError);
+ expect(() =>
+ valueOf({
+ type: operations.COMMAND_SHOW_OPEN,
+ alter: "true",
+ })
+ ).to.throw(TypeError);
});
});
-})
+});