Skip to content

Commit dd3a48f

Browse files
committed
add tests for tasks and standups
1 parent 6f1e4f3 commit dd3a48f

File tree

4 files changed

+368
-83
lines changed

4 files changed

+368
-83
lines changed
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
const standupProgressDay1 = {
2+
type: "user",
3+
completed: "Working on a backend Go project",
4+
planned: "Implement error handling for API endpoints",
5+
blockers: "Waiting for database access credentials",
6+
};
7+
8+
const standupProgressDay2 = {
9+
type: "user",
10+
completed: "Completed API integration for user authentication",
11+
planned: "Optimize database queries for improved performance",
12+
blockers: "None",
13+
};
14+
15+
const incompleteProgress = [
16+
{
17+
missingField: "type",
18+
payload: {
19+
completed: "Implemented caching mechanism for frequent API requests",
20+
planned: "Refactor code to follow coding best practices",
21+
blockers: "Waiting for feedback from the code review",
22+
},
23+
},
24+
{
25+
missingField: "completed",
26+
payload: {
27+
type: "user",
28+
planned: "Refactor code to follow coding best practices",
29+
blockers: "Waiting for feedback from the code review",
30+
},
31+
},
32+
{
33+
missingField: "planned",
34+
payload: {
35+
type: "user",
36+
completed: "Implemented caching mechanism for frequent API requests",
37+
blockers: "Waiting for feedback from the code review",
38+
},
39+
},
40+
{
41+
missingField: "blockers",
42+
payload: {
43+
type: "user",
44+
completed: "Implemented caching mechanism for frequent API requests",
45+
planned: "Refactor code to follow coding best practices",
46+
},
47+
},
48+
];
49+
50+
const stubbedModelProgressData = (userId, createdAt, date) => {
51+
return [
52+
{
53+
userId,
54+
createdAt,
55+
date,
56+
type: "user",
57+
completed: "Implemented caching mechanism for frequent API requests",
58+
planned: "Refactor code to follow coding best practices",
59+
blockers: "Waiting for feedback from the code review",
60+
},
61+
];
62+
};
63+
64+
const taskProgressDay1 = (taskId) => {
65+
return {
66+
taskId,
67+
type: "task",
68+
completed: "Working on a backend Go Task",
69+
planned: "Implement error handling for API endpoints",
70+
blockers: "Waiting for database access credentials",
71+
};
72+
};
73+
74+
const taskProgressDay2 = (taskId) => {
75+
return {
76+
taskId,
77+
type: "task",
78+
completed: "Completed API integration for user authentication",
79+
planned: "Optimize database queries for improved performance",
80+
blockers: "None",
81+
};
82+
};
83+
84+
const incompleteTaskProgress = (taskId) => [
85+
{
86+
missingField: "type",
87+
payload: {
88+
taskId,
89+
completed: "Implemented caching mechanism for frequent API requests",
90+
planned: "Refactor code to follow coding best practices",
91+
blockers: "Waiting for feedback from the code review",
92+
},
93+
},
94+
{
95+
missingField: "completed",
96+
payload: {
97+
taskId,
98+
type: "task",
99+
planned: "Refactor code to follow coding best practices",
100+
blockers: "Waiting for feedback from the code review",
101+
},
102+
},
103+
{
104+
missingField: "planned",
105+
payload: {
106+
taskId,
107+
type: "task",
108+
completed: "Implemented caching mechanism for frequent API requests",
109+
blockers: "Waiting for feedback from the code review",
110+
},
111+
},
112+
{
113+
missingField: "blockers",
114+
payload: {
115+
taskId,
116+
type: "task",
117+
completed: "Implemented caching mechanism for frequent API requests",
118+
planned: "Refactor code to follow coding best practices",
119+
},
120+
},
121+
{
122+
missingField: "taskId",
123+
payload: {
124+
type: "task",
125+
completed: "Implemented caching mechanism for frequent API requests",
126+
planned: "Refactor code to follow coding best practices",
127+
blockers: "Waiting for feedback from the code review",
128+
},
129+
},
130+
];
131+
132+
const stubbedModelTaskProgressData = (userId, taskId, createdAt, date) => {
133+
return [
134+
{
135+
userId,
136+
taskId,
137+
createdAt,
138+
date,
139+
type: "task",
140+
completed: "Implemented caching mechanism for frequent API requests",
141+
planned: "Refactor code to follow coding best practices",
142+
blockers: "Waiting for feedback from the code review",
143+
},
144+
];
145+
};
146+
147+
module.exports = {
148+
standupProgressDay1,
149+
standupProgressDay2,
150+
incompleteProgress,
151+
stubbedModelProgressData,
152+
taskProgressDay1,
153+
taskProgressDay2,
154+
incompleteTaskProgress,
155+
stubbedModelTaskProgressData,
156+
};

test/fixtures/progress/userProgress.js

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)