Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
"format": "prettier --write \"src/**\" \"README.md\""
},
"devDependencies": {
"@types/jest": "^27.4.0",
"@types/jest": "^30.0.0",
"@types/mock-fs": "4.13.0",
"@types/serverless": "3.12.27",
"jest": "^29.7.0",
"jest": "^30.2.0",
"jest-environment-node": "^30.2.0",
"mock-fs": "4.13.0",
"prettier": "^3.6.2",
Expand Down
6 changes: 3 additions & 3 deletions src/env.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ describe("setEnvConfiguration", () => {
},
handlers,
);
}).toThrowError("When `llmObsEnabled` is true, `llmObsMlApp` must also be set.");
}).toThrow("When `llmObsEnabled` is true, `llmObsMlApp` must also be set.");
});

it("throws error when `llmObsMlApp` is set to an invalid value", () => {
Expand Down Expand Up @@ -1227,7 +1227,7 @@ describe("setEnvConfiguration", () => {
},
handlers,
);
}).toThrowError(
}).toThrow(
"`llmObsMlApp` must only contain up to 193 alphanumeric characters, hyphens, underscores, periods, and slashes.",
);
});
Expand Down Expand Up @@ -1271,7 +1271,7 @@ describe("setEnvConfiguration", () => {
},
handlers,
);
}).toThrowError(
}).toThrow(
"apiKeySecretArn` is not supported for Node runtimes when using Synchronous Metrics. Set DATADOG_API_KEY in your environment, or use `apiKmsKey` in the configuration.",
);
});
Expand Down
4 changes: 2 additions & 2 deletions src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,7 @@ describe("ServerlessPlugin", () => {
const plugin = new ServerlessPlugin(serverless, {});
expect(async () => {
await plugin.hooks["after:datadog:generate:init"]();
}).rejects.toThrowError(
}).rejects.toThrow(
"The following configuration options have been removed: subscribeToApiGatewayLogs. Please use the subscribeToAccessLogs or subscribeToExecutionLogs options instead.",
);
});
Expand Down Expand Up @@ -1620,7 +1620,7 @@ describe("ServerlessPlugin", () => {
const plugin = new ServerlessPlugin(serverless, {});
expect(async () => {
await plugin.hooks["after:datadog:generate:init"]();
}).rejects.toThrowError(
}).rejects.toThrow(
"The following configuration options have been removed: subscribeToApiGatewayLogs subscribeToHttpApiLogs subscribeToWebsocketLogs. Please use the subscribeToAccessLogs or subscribeToExecutionLogs options instead.",
);
});
Expand Down
6 changes: 3 additions & 3 deletions src/monitor-api-requests.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,9 @@ describe("searchMonitor", () => {
});
it("throws an Invalid Authentication Error when authentication is invalid", async () => {
(fetch as unknown as jest.Mock).mockReturnValue({ status: 403, statusText: "Unauthorized" });
await expect(
async () => await searchMonitors("datadoghq.com", "queryString", "apikey", "appkey"),
).rejects.toThrowError("Can't fetch monitors. Status code: 403. Message: Unauthorized");
await expect(async () => await searchMonitors("datadoghq.com", "queryString", "apikey", "appkey")).rejects.toThrow(
"Can't fetch monitors. Status code: 403. Message: Unauthorized",
);
});
});

Expand Down
8 changes: 4 additions & 4 deletions src/span-link.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe("mergeStepFunctionAndLambdaTraces option related tests", () => {
const service = serviceWithResources();
const serverless: Serverless = service.serverless;
mergeStepFunctionAndLambdaTraces(resources, serverless);
expect(stepFunctionsHelper.updateDefinitionString).toBeCalledTimes(0);
expect(stepFunctionsHelper.updateDefinitionString).toHaveBeenCalledTimes(0);
});

it("have one state machine in the resources", async () => {
Expand All @@ -63,7 +63,7 @@ describe("mergeStepFunctionAndLambdaTraces option related tests", () => {
const service = serviceWithResources();
const serverless: Serverless = service.serverless;
mergeStepFunctionAndLambdaTraces(resources, serverless);
expect(stepFunctionsHelper.updateDefinitionString).toBeCalledTimes(1);
expect(stepFunctionsHelper.updateDefinitionString).toHaveBeenCalledTimes(1);
});

it("can handle a steate machine with a string DefinitionString", async () => {
Expand All @@ -82,7 +82,7 @@ describe("mergeStepFunctionAndLambdaTraces option related tests", () => {
const service = serviceWithResources();
const serverless: Serverless = service.serverless;
mergeStepFunctionAndLambdaTraces(resources, serverless);
expect(stepFunctionsHelper.updateDefinitionString).toBeCalledTimes(1);
expect(stepFunctionsHelper.updateDefinitionString).toHaveBeenCalledTimes(1);
});

it("have two state machine in the resources", async () => {
Expand Down Expand Up @@ -110,7 +110,7 @@ describe("mergeStepFunctionAndLambdaTraces option related tests", () => {
const service = serviceWithResources();
const serverless: Serverless = service.serverless;
mergeStepFunctionAndLambdaTraces(resources, serverless);
expect(stepFunctionsHelper.updateDefinitionString).toBeCalledTimes(2);
expect(stepFunctionsHelper.updateDefinitionString).toHaveBeenCalledTimes(2);
});
});
});
Loading