Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add standalone mode for integration testing #3

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

rg-wood
Copy link

@rg-wood rg-wood commented Jan 7, 2024

Add a test mode for client integration testing. The package was modified to be publishable and installable:

npm i -D activitypub-starter-kit

The code was modified to be more modular so that it can be started programmatically without the need for environment variable or .env configuration. A utility method was added to quickly setup a test instance:

const app = ActivityPubApp.testApp();

app.start();

// ... tests

// cleanup
app.stop();

This will start a test instance on http://localhost:3000.

See here for an example test suite:

https://github.com/actionslaw/actionslaw-action/blob/4297ccaba1de48c1a638dc5fe0df3a40824931f6/test/integration/ActivityPub.test.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants