npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jest-environment-testack

v0.0.19

Published

testack.js environment for Jest

Downloads

5

Readme

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

| 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 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