jest-environment-testack
v0.0.19
Published
testack.js environment for Jest
Downloads
5
Maintainers
Readme
jest-environment-testack
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
| Name| Type | Description | Default |
|:--- | :--- | :--- | :---: |
| verbose
| Boolean | Enable complete Testack http logs. | false
|
| output
| Boolean | Show Testack output. | true
|
| env
| String | Testack test environment to use, from testack.conf.js
. Learn more about test environments in the Testack docs. | none |
| parallel
| Boolean | Set this to true when running tests in parallel | false
|
| persistGlobals
| Boolean | Persist 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
|
| configFile
| String | The 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
|
| timeout
| Number | Set 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 whenautoStartSession
is off in order to update the capabilities at run-time;.launchBrowser()
- used whenautoStartSession
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