@theia-extension-tester/che-factory-runner
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

che-factory-runner

Module extending @theia-extension-tester/mocha-runner functionality. Its only purpose is to create new Eclipse Che workbench and run tests in the workbench. In order to create workbench the user must provide devfile.yml.

Usage

Install via npm

npm install @theia-extension-tester/che-factory-runner

Install via yarn

yarn add @theia-extension-tester/che-factory-runner

Create new CheTheiaFactoryRunner object. For browser creation please refer to @theia-extension-tester/che-browser and for authenticator see @theia-extension-tester/openshift-authenticator.

Some Devfile urls can be found in Devfile registry.

const runner = new CheTheiaFactoryRunner(browser, {
    // Base Eclipse Che url.
    cheUrl: cheUrl,
    // Url to devfile.yml. Must be on accessible public
    // place (e.g. GitHub repository).
    factoryUrl: devfileUrl,
    // Mocha options
    mochaOptions: {
        ...mochaOptions
    }
    // Factory attributes to be appended to Url.
    // This attribute is used when it is desirable
    // to override some field in Devfile.
    factoryAttributes: {
        ...factoryAttributes
    }
}, authenticator);

Then it is possible to run tests in provided browser.

await runner.runTests([
    "out/tests/Input.test.js",
    "out/tests/TextEditor.test.js"
]);

Dependencies (5)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @theia-extension-tester/che-factory-runner

    Weekly Downloads

    0

    Version

    0.1.2

    License

    Apache-2.0

    Unpacked Size

    19.3 kB

    Total Files

    9

    Last publish

    Collaborators

    • mlorinc