Skip to content

Commit

Permalink
Fix the upload test
Browse files Browse the repository at this point in the history
It used integers for values, all values must be passed as strings and wrapped in quotes (at least for now).
  • Loading branch information
aelithron committed Dec 14, 2024
1 parent b824235 commit 6f21b2f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions __tests__/server-uploadstats.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe("POST /server/stats Valid", () => {
records: [
{
"uuid": "b876ec32-e396-476b-a115-8438d83c67d4", // Technoblade's UUID, Rest in Peace <3
"value": 100
"value": "100"
}
]
}).set("authorization", `Bearer ${process.env.API_KEY}`);
Expand All @@ -28,7 +28,7 @@ describe("POST /server/stats Invalid Key", () => {
records: [
{
"uuid": "b876ec32-e396-476b-a115-8438d83c67d4", // Technoblade's UUID, Rest in Peace <3
"value": 100
"value": "100"
}
]
});
Expand All @@ -42,7 +42,7 @@ describe("POST /server/stats Invalid Key", () => {
records: [
{
"uuid": "b876ec32-e396-476b-a115-8438d83c67d4", // Technoblade's UUID, Rest in Peace <3
"value": 100
"value": "100"
}
]
}).set("authorization", `Bearer invalid-data`);
Expand All @@ -58,7 +58,7 @@ describe("POST /server/stats Invalid Body", () => {
records: [
{
"uuid": "b876ec32-e396-476b-a115-8438d83c67d4", // Technoblade's UUID, Rest in Peace <3
"value": 100
"value": "100"
}
]
}).set("authorization", `Bearer ${process.env.API_KEY}`);
Expand All @@ -71,7 +71,7 @@ describe("POST /server/stats Invalid Body", () => {
records: [
{
"uuid": "b876ec32-e396-476b-a115-8438d83c67d4", // Technoblade's UUID, Rest in Peace <3
"value": 100
"value": "100"
}
]
}).set("authorization", `Bearer ${process.env.API_KEY}`);
Expand Down Expand Up @@ -105,7 +105,7 @@ describe("POST /server/stats Invalid Record", () => {
records: [
{
"uuid": "invalid-data",
"value": 100
"value": "100"
}
]
}).set("authorization", `Bearer ${process.env.API_KEY}`);
Expand Down

0 comments on commit 6f21b2f

Please sign in to comment.