Skip to content

Commit

Permalink
fix tests and fix security issues (#1067)
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-t-wang authored Nov 25, 2024
1 parent d7323e3 commit c72c5a0
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
5 changes: 4 additions & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@
},
"license": "MIT",
"name": "worldcoin-developer-portal",
"overrides": {
"cross-spawn": "^7.0.5"
},
"private": true,
"scripts": {
"build": "next build",
Expand All @@ -124,8 +127,8 @@
"lint": "next lint",
"lint:fix": "next lint --fix",
"start": "next start",
"test:e2e": "playwright test",
"test:api": "jest tests/api",
"test:e2e": "playwright test",
"test:integration": "node tests/verifyHasuraIsUp.js && jest tests/integration --runInBand",
"test:integration:server": "docker compose -f ../docker-compose-test.yaml up --abort-on-container-exit",
"test:unit": "jest tests/unit",
Expand Down
8 changes: 4 additions & 4 deletions web/tests/api/v2/minikit-app-metadata.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const validAppMetadataResponse = [
support_link: "mailto:[email protected]",
supported_countries: ["us"],
supported_languages: ["en"],
app_rating: 3.4,
app_rating: 0,
associated_domains: ["https://worldcoin.org"],
app: { team: { name: "test" } },
},
Expand Down Expand Up @@ -127,7 +127,7 @@ const app_metadata = {
supported_countries: ["us"],
supported_languages: ["en"],
associated_domains: ["https://worldcoin.org"],
app_rating: 3.4,
app_rating: 0,
unique_users: 0,
team_name: "test",
};
Expand Down Expand Up @@ -183,7 +183,7 @@ describe("/api/v2/minikit/app-metadata/[app_id] [success cases]", () => {
associated_domains: ["https://worldcoin.org"],
supported_countries: ["us"],
supported_languages: ["en"],
app_rating: 3.4,
app_rating: 0,
app: { team: { name: "test" } },
},
],
Expand Down Expand Up @@ -222,7 +222,7 @@ describe("/api/v2/minikit/app-metadata/[app_id] [success cases]", () => {
support_link: "mailto:[email protected]",
supported_countries: ["us"],
supported_languages: ["en"],
app_rating: 3.4,
app_rating: 0,
unique_users: 0,
team_name: "test",
});
Expand Down
12 changes: 6 additions & 6 deletions web/tests/api/v2/public/apps/app.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jest.mock(
contracts: ["0x0c892815f0B058E69987920A23FBb33c834289cf"],
permit2_tokens: ["0x0c892815f0B058E69987920A23FBb33c834289cf"],
supported_languages: ["en", "es"],
app_rating: 3.4,
app_rating: 0,
verification_status: "unverified",
app: {
team: {
Expand Down Expand Up @@ -92,7 +92,7 @@ describe("/api/public/app/[app_id]", () => {
support_link: "[email protected]",
supported_countries: ["us"],
supported_languages: ["en", "es"],
app_rating: 3.4,
app_rating: 0,
unique_users: 0,
verification_status: "unverified",
description: {
Expand Down Expand Up @@ -135,7 +135,7 @@ describe("/api/public/app/[app_id]", () => {
contracts: ["0x0c892815f0B058E69987920A23FBb33c834289cf"],
permit2_tokens: ["0x0c892815f0B058E69987920A23FBb33c834289cf"],
supported_languages: ["en", "es"],
app_rating: 3.4,
app_rating: 0,
verification_status: "verified",
app: {
team: {
Expand Down Expand Up @@ -182,7 +182,7 @@ describe("/api/public/app/[app_id]", () => {
support_link: "[email protected]",
supported_countries: ["us"],
supported_languages: ["en", "es"],
app_rating: 3.4,
app_rating: 0,
unique_users: 0,
verification_status: "verified",
description: {
Expand Down Expand Up @@ -234,7 +234,7 @@ describe("/api/public/app/[app_id]", () => {
permit2_tokens: ["0x0c892815f0B058E69987920A23FBb33c834289cf"],
supported_countries: ["us"],
supported_languages: ["en", "es"],
app_rating: 3.4,
app_rating: 0,
app: {
team: {
name: "Example Team",
Expand Down Expand Up @@ -270,7 +270,7 @@ describe("/api/public/app/[app_id]", () => {
associated_domains: ["https://worldcoin.org"],
contracts: ["0x0c892815f0B058E69987920A23FBb33c834289cf"],
permit2_tokens: ["0x0c892815f0B058E69987920A23FBb33c834289cf"],
app_rating: 3.4,
app_rating: 0,
unique_users: 0,
whitelisted_addresses: ["0x1234", "0x5678"],
category: { id: "social", name: "Social" },
Expand Down
8 changes: 4 additions & 4 deletions web/tests/api/v2/public/apps/apps.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ describe("/api/v2/public/apps", () => {
},
world_app_button_text: "random",
world_app_description: "random",
app_rating: 3.4,
app_rating: 0,
verification_status: "verified",
},
{
Expand Down Expand Up @@ -261,7 +261,7 @@ describe("/api/v2/public/apps", () => {
team_name: "Example Team",
world_app_button_text: "random",
world_app_description: "random",
app_rating: 3.4,
app_rating: 0,
verification_status: "verified",
},
{
Expand All @@ -279,7 +279,7 @@ describe("/api/v2/public/apps", () => {
],
whitelisted_addresses: ["0x1234", "0x5678"],
unique_users: 0,
app_rating: 3.4,
app_rating: 0,
app_mode: "mini-app",
associated_domains: ["https://worldcoin.org"],
contracts: ["0x0c892815f0B058E69987920A23FBb33c834289cf"],
Expand Down Expand Up @@ -384,7 +384,7 @@ describe("/api/v2/public/apps", () => {
supported_languages: ["en", "es"],
ratings_external_nullifier:
"0x00ca597c4f12f9f85a633bb04cfdc877af7c2d91a6c1c7fe45031b495a227a58",
app_rating: 3.4,
app_rating: 0,
unique_users: 0,
whitelisted_addresses: ["0x1234", "0x5678"],
category: { id: "social", name: "Social" },
Expand Down

0 comments on commit c72c5a0

Please sign in to comment.