Notice: This utility has been discontinued. Test utilities are now provided by the same modules that provide the functionality. See the test utilities exported by jellyfish-core
and jellyfish-worker
.
Jellyfish Test Harness
Test harness helpers for Jellyfish repos.
Usage
Below are examples on how to use this library:
Sync integration translate tests
Below is an overview of how to call the scenario runner to execute translate tests.
Real world examples can be found in many Jellyfish plugins as well.
import { syncIntegrationScenario } from '@balena/jellyfish-test-harness';
import webhooks from './webhooks/my-integration-name';
syncIntegrationScenario.run(
{
test,
before: beforeAll,
beforeEach,
after: afterAll,
afterEach,
}, {
basePath: __dirname,
before: (test) => {},
beforeEach: (test) => {},
after: (test) => {},
afterEach: (test) => {},
prepareEvent: (event: any) => { return event },
options: {},
plugins: [],
cards: [ ... ],
scenarios: webhooks,
baseUrl: 'https://<my-integration-endpoint>',
stubRegex: /.*/,
source: '<my-integration>',
isAuthorized: (request) => {
...
},
},
);
Documentation
Writing translate tests

Visit the website for complete documentation: https://product-os.github.io/jellyfish-test-harness