Skip to content

Commit

Permalink
feat: add http api tests to web sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
rishtigupta committed Nov 19, 2024
1 parent 21e9719 commit 30c3cac
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/client-sdk-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"test": "jest --testPathIgnorePatterns auth-client.test.ts --maxWorkers 1",
"unit-test": "jest unit",
"integration-test-auth": "jest --env=jsdom auth/ --maxWorkers 1 -- useConsistentReads",
"integration-test-http": "jest --env=jsdom http/ --maxWorkers 1 -- useConsistentReads",
"integration-test-cache": "jest --env=jsdom cache/ --maxWorkers 1 -- useConsistentReads",
"integration-test-control-cache-topics": "npm run integration-test-cache && npm run integration-test-topics",
"integration-test-leaderboard": "jest --env=jsdom leaderboard/ --maxWorkers 1 -- useConsistentReads",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import {SetupAuthClientIntegrationTest} from '../../integration-setup';
import {runHttpApiTest} from '@gomomento/common-integration-tests/dist/src/http/http-apis';

const {mgaAccountSessionTokenAuthClient, cacheName} =
SetupAuthClientIntegrationTest();

runHttpApiTest(mgaAccountSessionTokenAuthClient, cacheName);
1 change: 0 additions & 1 deletion packages/common-integration-tests/src/http/http-apis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ export function runHttpApiTest(
// Use DELETE API to delete the value that was set
const delRes = await deleteValue(baseUrl, apiKey, cacheName, key);
expect(delRes.statusCode).toBe(204);
console.log(delRes.statusMessage);
});

it('should return success on DELETE on non-existing key', async () => {
Expand Down

0 comments on commit 30c3cac

Please sign in to comment.