Installations
npm install @codeceptjs/helper
Score
93.7
Supply Chain
100
Quality
80.3
Maintenance
100
Vulnerability
99.3
License
Releases
Contributors
Developer
codeceptjs
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
Yes
Node Version
20.11.1
NPM Version
10.2.4
Statistics
1 Stars
26 Commits
4 Forks
5 Watching
1 Branches
6 Contributors
Updated on 10 Feb 2024
Bundle Size
1.26 kB
Minified
645.00 B
Minified + Gzipped
Languages
TypeScript (95.64%)
JavaScript (4.36%)
Total Downloads
Cumulative downloads
Total Downloads
24,942,291
Last day
-5.9%
43,300
Compared to previous day
Last week
11.6%
224,923
Compared to previous week
Last month
40.2%
919,451
Compared to previous month
Last year
3.4%
7,294,882
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Dev Dependencies
5
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 @codeceptjs/helper --save
Usage
Create CodeceptJS helper as described in documentation.
1const Helper = require('@codeceptjs/helper'); 2 3class MyHelper extends Helper { 4 // implement custom helper here 5}
API
Table of Contents
- Helper
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
_after
Hook executed after each test
_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
CodeceptJS.Step
_afterStep
Hook executed after each step
Parameters
step
CodeceptJS.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
msg
string
debugSection
Parameters
_config
Abstract method to provide required config options
Returns any
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
packaging workflow detected
Details
- Info: Project packages its releases by way of GitHub Actions.: .github/workflows/publish-node.js.yml:12
Reason
Found 2/17 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-node.js.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/codeceptjs/helper/publish-node.js.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-node.js.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/codeceptjs/helper/publish-node.js.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/codeceptjs/helper/test.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/codeceptjs/helper/test.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/publish-node.js.yml:24
- Warn: npmCommand not pinned by hash: .github/workflows/test.yml:29
- Info: 0 out of 4 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 2 npmCommand dependencies pinned
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/publish-node.js.yml:1
- Warn: no topLevel permission defined: .github/workflows/test.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 14 are checked with a SAST tool
Score
3.9
/10
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More