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

hermiona-helper

v2.2.0

Published

Base class for HermionaJS helpers

Downloads

7

Readme

CodeceptJS Helper

Base class for all CodeceptJS helpers. This class has been moved into a separate package to allow other helpers to be extended from it, without requiring main codeceptjs package.

Installation

npm i hermiona-helper --save

Usage

Create CodeceptJS helper as described in documentation.

const Helper = require('hermiona-helper');

class MyHelper extends Helper {
  // implement custom helper here
}

API

Table of Contents

Helper

Abstract class. Helpers abstracts test execution backends.

Methods of Helper class will be available in tests in I object. They provide user-friendly abstracted actions over NodeJS libraries.

Hooks (methods starting with _) can be used to setup/teardown, or handle execution flow.

Methods are expected to return a value in order to be wrapped in promise.

Parameters

  • config any

_validateConfig

Abstract method to validate config

Parameters
  • config any

Returns any

_setConfig

Sets config for current test

Parameters
  • opts any

_init

Hook executed before all tests

_before

Hook executed before each test.

Parameters
  • test Mocha.Test? (optional, default null)

_after

Hook executed after each test

Parameters
  • test Mocha.Test? (optional, default null)

_test

Hook provides a test details Executed in the very beginning of a test

Parameters
  • test Mocha.Test

_passed

Hook executed after each passed test

Parameters
  • test Mocha.Test

_failed

Hook executed after each failed test

Parameters
  • test Mocha.Test

_beforeStep

Hook executed before each step

Parameters
  • step HermionaJS.Step

_afterStep

Hook executed after each step

Parameters
  • step HermionaJS.Step

_beforeSuite

Hook executed before each suite

Parameters
  • suite Mocha.Suite

_afterSuite

Hook executed after each suite

Parameters
  • suite Mocha.Suite

_finishTest

Hook executed after all tests are executed

Parameters
  • suite Mocha.Suite

_useTo

Abstract method to provide common interface to accessing helpers internals inside a test.

Parameters
  • description
  • fn

helpers

Access another configured helper: this.helpers['AnotherHelper']

Type: any

debug

Print debug message to console (outputs only in debug mode)

Parameters

debugSection

Parameters

_config

Abstract method to provide required config options

Returns any