0.0.19 • Published 1 year ago

jest-environment-testack v0.0.19

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

jest-environment-testack

Build Status version Discord MIT License

Testack environment for Jest. Testack.js is an integrated test framework for performing automated end-to-end testing on web applications and websites, across all major browsers.

npm install jest-environment-testack

Usage:

Update your Jest configuration:

{
  testEnvironment: 'jest-environment-testack',
  projectConfig: {
    testEnvironmentOptions: {
      providers: [ {provider: "MongoDB"} ],
      actions: [{
        event: "setup",
        provider: "MongoDB",
        method: "reset"
      }]
    },
  }
}

Testack options

NameTypeDescriptionDefault
verboseBooleanEnable complete Testack http logs.false
outputBooleanShow Testack output.true
envStringTestack test environment to use, from testack.conf.js. Learn more about test environments in the Testack docs.none
parallelBooleanSet this to true when running tests in parallelfalse
persistGlobalsBooleanPersist the same globals object between runs or have a (deep) copy of it per each test. Learn more about test globals in the Testack docs.true
configFileStringThe Testack config file to use. A config file will be auto-generated by default, but this allows you to change that. Learn more about the Testack config in the Testack docs../testack.conf.js
timeoutNumberSet the global timeout for assertion retries before an assertion fails.5000

you can also use the jest-environment-testack for only a specific suite case:

/**
 * @jest-environment jest-environment-testack
 */
  it('use jest-environment-testack in this test file', function() {
    expect(global.testack).toBeDefined();
  });

jest test suite life cycle

setup add_hook start_describe_definition add_test finish_describe_definition run_start run_describe_start hook_start hook_success test_fn_start test_fn_success test_done run_describe_finish run_finish teardown

global.testack

The Jest environment used the Testack programmatic API to create the Testack instance and export the browser API.

Available properties/methods:

  • .element(<locator>) - use the Testack .element() API to locate elements in the page;
  • .updateCapabilities({ capabilities }) - used when autoStartSession is off in order to update the capabilities at run-time;
  • .launchBrowser() - used when autoStartSession is off in order to start the session and open the browser;
  • .settings - the Testack settings object;
  • .testack_client - the Testack (internal) instance.

License

MIT

0.0.19

1 year ago

0.0.18

1 year ago

0.0.17

1 year ago

0.0.16

1 year ago

0.0.15

1 year ago

0.0.14

1 year ago

0.0.13

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago