Skip to content

Commit

Permalink
Merge pull request #2069 from cardstack/realm-server-tests-split
Browse files Browse the repository at this point in the history
Split realm-server-test.ts into two files, one for realm endpoints and one for global endpoints
  • Loading branch information
lukemelia authored Jan 21, 2025
2 parents 49c52ea + 497c6da commit 0fa1e68
Show file tree
Hide file tree
Showing 5 changed files with 1,861 additions and 1,677 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ jobs:
"loader-test.ts",
"module-syntax-test.ts",
"queue-test.ts",
"realm-server-test.ts",
"realm-endpoints-test.ts",
"server-endpoints-test.ts",
"virtual-network-test.ts",
]
steps:
Expand Down
2 changes: 1 addition & 1 deletion docs/realm.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The capabilites of the realm are:

The entry point that serves these requests `handle` function in `realm.ts` file. Depending on the `Accept` header (the recognized ones are `application/vnd.card+json`, `application/vnd.card+source`, `application/vnd.api+json`, `text/event-stream`, `text/html`) and the HTTP verb (`GET`, `PATCH`, `POST`, `DELETE` ), it will perform one of the actions listed in the above list. The routing that depends on the MIME type and HTTP method is defined in `router.ts`. There's a special case of requesting the realm root (`/`) with `GET` and `application/vnd.card+json`. This looks for a card instance at `index.json` to return.

The different types of requests, together with its params, are documented in `realm-server-test.ts`.
The different types of requests, together with its params, are documented in `realm-endpoints-test.ts`.

## Transpiling code

Expand Down
3 changes: 2 additions & 1 deletion packages/realm-server/tests/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import './loader-test';
import './module-syntax-test';
import './permissions/permission-checker-test';
import './queue-test';
import './realm-server-test';
import './realm-endpoints-test';
import './server-endpoints-test';
import './virtual-network-test';
import './billing-test';

Expand Down
Loading

0 comments on commit 0fa1e68

Please sign in to comment.