fix: resolve all TypeScript errors in web app
This commit is contained in:
@@ -97,9 +97,9 @@ describe("TaskList", () => {
|
||||
});
|
||||
|
||||
it("should handle tasks with missing required fields", () => {
|
||||
const malformedTasks = [
|
||||
const malformedTasks: Task[] = [
|
||||
{
|
||||
...mockTasks[0],
|
||||
...mockTasks[0]!,
|
||||
title: "", // Empty title
|
||||
},
|
||||
];
|
||||
@@ -110,9 +110,9 @@ describe("TaskList", () => {
|
||||
});
|
||||
|
||||
it("should handle tasks with invalid dates", () => {
|
||||
const tasksWithBadDates = [
|
||||
const tasksWithBadDates: Task[] = [
|
||||
{
|
||||
...mockTasks[0],
|
||||
...mockTasks[0]!,
|
||||
dueDate: new Date("invalid-date"),
|
||||
},
|
||||
];
|
||||
@@ -122,8 +122,8 @@ describe("TaskList", () => {
|
||||
});
|
||||
|
||||
it("should handle extremely large task lists", () => {
|
||||
const largeTasks = Array.from({ length: 1000 }, (_, i) => ({
|
||||
...mockTasks[0],
|
||||
const largeTasks: Task[] = Array.from({ length: 1000 }, (_, i) => ({
|
||||
...mockTasks[0]!,
|
||||
id: `task-${i}`,
|
||||
title: `Task ${i}`,
|
||||
}));
|
||||
@@ -133,8 +133,8 @@ describe("TaskList", () => {
|
||||
});
|
||||
|
||||
it("should handle tasks with very long titles", () => {
|
||||
const longTitleTask = {
|
||||
...mockTasks[0],
|
||||
const longTitleTask: Task = {
|
||||
...mockTasks[0]!,
|
||||
title: "A".repeat(500),
|
||||
};
|
||||
|
||||
@@ -143,8 +143,8 @@ describe("TaskList", () => {
|
||||
});
|
||||
|
||||
it("should handle tasks with special characters in title", () => {
|
||||
const specialCharTask = {
|
||||
...mockTasks[0],
|
||||
const specialCharTask: Task = {
|
||||
...mockTasks[0]!,
|
||||
title: '<script>alert("xss")</script>',
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user