Skip to content

Commit

Permalink
Update depends
Browse files Browse the repository at this point in the history
  • Loading branch information
aarong committed Feb 6, 2024
1 parent cdce91d commit 826c7df
Show file tree
Hide file tree
Showing 28 changed files with 2,887 additions and 3,095 deletions.
2,239 changes: 1,011 additions & 1,228 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@
"@babel/register": "^7.0.0",
"babel-plugin-add-module-exports": "^1.0.4",
"documentation": "^14.0.3",
"eslint": "^5.12.0",
"eslint-config-airbnb-base": "^13.1.0",
"eslint-config-prettier": "^3.1.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-prettier": "^3.0.1",
"eslint": "^8.56.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"ghooks": "^2.0.4",
"glob": "^10.3.10",
"jest": "^29.7.0",
"jest-cli": "^29.7.0",
"prettier": "^1.14.3"
"prettier": "^3.2.5"
},
"config": {
"ghooks": {
Expand Down
10 changes: 5 additions & 5 deletions src/__tests__/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"env": {
"jest": true
}
}
module.exports = {
env: {
jest: true,
},
};
4 changes: 2 additions & 2 deletions src/__tests__/actionrequest.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import actionRequest from "../actionrequest";
describe("The actionRequest() factory function", () => {
it("should return an object", () => {
expect(
actionRequest("client1", "callback_id", "someAction", { action: "arg" })
actionRequest("client1", "callback_id", "someAction", { action: "arg" }),
).toEqual({
clientId: "client1",
actionName: "someAction",
actionArgs: { action: "arg" },
_actionCallbackId: "callback_id"
_actionCallbackId: "callback_id",
});
});
});
100 changes: 50 additions & 50 deletions src/__tests__/actionresponse.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ describe("The actionResponse() factory function", () => {
"some_client",
"some_action",
{
action: "arg"
action: "arg",
},
"some_callback_id"
"some_callback_id",
);
const ares = actionResponse(s, areq);
expect(ares._server).toBe(s);
Expand All @@ -33,15 +33,15 @@ describe("The success(), failure(), and _neutralize() functions", () => {
// Create the object
const s = {
_appActionSuccess: jest.fn(),
_appActionFailure: jest.fn()
_appActionFailure: jest.fn(),
};
const areq = actionRequest(
"some_client",
"some_callback_id",
"some_action",
{
action: "arg"
}
action: "arg",
},
);
const ares = actionResponse(s, areq);

Expand All @@ -54,7 +54,7 @@ describe("The success(), failure(), and _neutralize() functions", () => {
expect(() => {
ares.success({ something: undefined });
}).toThrow(
new Error("INVALID_ARGUMENT: Action data is not JSON-expressible.")
new Error("INVALID_ARGUMENT: Action data is not JSON-expressible."),
);

// Failure - throw on invalid errorCode - type
Expand All @@ -71,7 +71,7 @@ describe("The success(), failure(), and _neutralize() functions", () => {
expect(() => {
ares.failure("SOME_ERROR", { something: undefined });
}).toThrow(
new Error("INVALID_ARGUMENT: Error data is not JSON-expressible.")
new Error("INVALID_ARGUMENT: Error data is not JSON-expressible."),
);
});

Expand All @@ -80,15 +80,15 @@ describe("The success(), failure(), and _neutralize() functions", () => {
// Create the object
const s = {
_appActionSuccess: jest.fn(),
_appActionFailure: jest.fn()
_appActionFailure: jest.fn(),
};
const areq = actionRequest(
"some_client",
"some_callback_id",
"some_action",
{
action: "arg"
}
action: "arg",
},
);
const ares = actionResponse(s, areq);

Expand All @@ -114,8 +114,8 @@ describe("The success(), failure(), and _neutralize() functions", () => {
ares.success({ action: "data" }).toBe(undefined);
}).toThrow(
new Error(
"ALREADY_RESPONDED: The success() or failure() method has already been called."
)
"ALREADY_RESPONDED: The success() or failure() method has already been called.",
),
);
expect(ares._server).toBe(null);
expect(ares._actionRequest).toBe(areq);
Expand All @@ -132,8 +132,8 @@ describe("The success(), failure(), and _neutralize() functions", () => {
ares._neutralize();
}).toThrow(
new Error(
"ALREADY_RESPONDED: The success() or failure() method has already been called."
)
"ALREADY_RESPONDED: The success() or failure() method has already been called.",
),
);
expect(ares._server).toBe(null);
expect(ares._actionRequest).toBe(areq);
Expand All @@ -147,15 +147,15 @@ describe("The success(), failure(), and _neutralize() functions", () => {
// Create the object
const s = {
_appActionSuccess: jest.fn(),
_appActionFailure: jest.fn()
_appActionFailure: jest.fn(),
};
const areq = actionRequest(
"some_client",
"some_callback_id",
"some_action",
{
action: "arg"
}
action: "arg",
},
);
const ares = actionResponse(s, areq);

Expand All @@ -181,8 +181,8 @@ describe("The success(), failure(), and _neutralize() functions", () => {
ares.failure("SOME_ERROR", { error: "data" }).toBe(undefined);
}).toThrow(
new Error(
"ALREADY_RESPONDED: The success() or failure() method has already been called."
)
"ALREADY_RESPONDED: The success() or failure() method has already been called.",
),
);
expect(ares._server).toBe(null);
expect(ares._actionRequest).toBe(areq);
Expand All @@ -199,8 +199,8 @@ describe("The success(), failure(), and _neutralize() functions", () => {
ares._neutralize();
}).toThrow(
new Error(
"ALREADY_RESPONDED: The success() or failure() method has already been called."
)
"ALREADY_RESPONDED: The success() or failure() method has already been called.",
),
);
expect(ares._server).toBe(null);
expect(ares._actionRequest).toBe(areq);
Expand All @@ -214,15 +214,15 @@ describe("The success(), failure(), and _neutralize() functions", () => {
// Create the object
const s = {
_appActionSuccess: jest.fn(),
_appActionFailure: jest.fn()
_appActionFailure: jest.fn(),
};
const areq = actionRequest(
"some_client",
"some_callback_id",
"some_action",
{
action: "arg"
}
action: "arg",
},
);
const ares = actionResponse(s, areq);

Expand All @@ -249,8 +249,8 @@ describe("The success(), failure(), and _neutralize() functions", () => {
ares.success({ action: "data" }).toBe(undefined);
}).toThrow(
new Error(
"ALREADY_RESPONDED: The success() or failure() method has already been called."
)
"ALREADY_RESPONDED: The success() or failure() method has already been called.",
),
);
expect(ares._server).toBe(null);
expect(ares._actionRequest).toBe(areq);
Expand All @@ -267,8 +267,8 @@ describe("The success(), failure(), and _neutralize() functions", () => {
ares._neutralize();
}).toThrow(
new Error(
"ALREADY_RESPONDED: The success() or failure() method has already been called."
)
"ALREADY_RESPONDED: The success() or failure() method has already been called.",
),
);
expect(ares._server).toBe(null);
expect(ares._actionRequest).toBe(areq);
Expand All @@ -282,15 +282,15 @@ describe("The success(), failure(), and _neutralize() functions", () => {
// Create the object
const s = {
_appActionSuccess: jest.fn(),
_appActionFailure: jest.fn()
_appActionFailure: jest.fn(),
};
const areq = actionRequest(
"some_client",
"some_callback_id",
"some_action",
{
action: "arg"
}
action: "arg",
},
);
const ares = actionResponse(s, areq);

Expand All @@ -317,8 +317,8 @@ describe("The success(), failure(), and _neutralize() functions", () => {
ares.failure("SOME_ERROR", { error: "data" }).toBe(undefined);
}).toThrow(
new Error(
"ALREADY_RESPONDED: The success() or failure() method has already been called."
)
"ALREADY_RESPONDED: The success() or failure() method has already been called.",
),
);
expect(ares._server).toBe(null);
expect(ares._actionRequest).toBe(areq);
Expand All @@ -335,8 +335,8 @@ describe("The success(), failure(), and _neutralize() functions", () => {
ares._neutralize();
}).toThrow(
new Error(
"ALREADY_RESPONDED: The success() or failure() method has already been called."
)
"ALREADY_RESPONDED: The success() or failure() method has already been called.",
),
);
expect(ares._server).toBe(null);
expect(ares._actionRequest).toBe(areq);
Expand All @@ -350,15 +350,15 @@ describe("The success(), failure(), and _neutralize() functions", () => {
// Create the object
const s = {
_appActionSuccess: jest.fn(),
_appActionFailure: jest.fn()
_appActionFailure: jest.fn(),
};
const areq = actionRequest(
"some_client",
"some_action",
{
action: "arg"
action: "arg",
},
"some_callback_id"
"some_callback_id",
);
const ares = actionResponse(s, areq);

Expand Down Expand Up @@ -391,8 +391,8 @@ describe("The success(), failure(), and _neutralize() functions", () => {
ares.success({ action: "data " });
}).toThrow(
new Error(
"ALREADY_RESPONDED: The success() or failure() method has already been called."
)
"ALREADY_RESPONDED: The success() or failure() method has already been called.",
),
);
expect(ares._server).toBe(null);
expect(ares._actionRequest).toBe(areq);
Expand All @@ -406,15 +406,15 @@ describe("The success(), failure(), and _neutralize() functions", () => {
// Create the object
const s = {
_appActionSuccess: jest.fn(),
_appActionFailure: jest.fn()
_appActionFailure: jest.fn(),
};
const areq = actionRequest(
"some_client",
"some_action",
{
action: "arg"
action: "arg",
},
"some_callback_id"
"some_callback_id",
);
const ares = actionResponse(s, areq);

Expand Down Expand Up @@ -447,8 +447,8 @@ describe("The success(), failure(), and _neutralize() functions", () => {
ares.failure("SOME_ERROR", { error: "data" });
}).toThrow(
new Error(
"ALREADY_RESPONDED: The success() or failure() method has already been called."
)
"ALREADY_RESPONDED: The success() or failure() method has already been called.",
),
);
expect(ares._server).toBe(null);
expect(ares._actionRequest).toBe(areq);
Expand All @@ -462,15 +462,15 @@ describe("The success(), failure(), and _neutralize() functions", () => {
// Create the object
const s = {
_appActionSuccess: jest.fn(),
_appActionFailure: jest.fn()
_appActionFailure: jest.fn(),
};
const areq = actionRequest(
"some_client",
"some_action",
{
action: "arg"
action: "arg",
},
"some_callback_id"
"some_callback_id",
);
const ares = actionResponse(s, areq);

Expand All @@ -491,8 +491,8 @@ describe("The success(), failure(), and _neutralize() functions", () => {
ares._neutralize();
}).toThrow(
new Error(
"ALREADY_NEUTRALIZED: The object has already been neutralized."
)
"ALREADY_NEUTRALIZED: The object has already been neutralized.",
),
);
expect(ares._server).toBe(null);
expect(ares._actionRequest).toBe(areq);
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/feedcloserequest.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe("The feedCloseRequest() factory function", () => {
clientId: "client1",
feedName: "some_feed",
feedArgs: { feed: "arg" },
_feedNameArgs: feedNameArgs
_feedNameArgs: feedNameArgs,
});
});
});
Loading

0 comments on commit 826c7df

Please sign in to comment.