Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tkc-fe/tkc-automated-testing

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tkc-fe/tkc-automated-testing

INTERNAL DEVELOPER GUIDE

  • 0.0.52
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source
INTERNAL DEVELOPER GUIDE

Automated Testing

Introduction

This package exports helper functions for automating tests as well as a template for a github actions layout that will compute coverage and comment this onto a pull requests comments.

Installation

Follow the basic setup instructions for using TKC packages from here, then install the package.

yarn add @thekeyholdingcompany/tkc-automated-testing -D

npm install @thekeyholdingcompany/tkc-automated-testing -D

Example


// test-script.js
const { runTests, asyncRunner } = require('@TheKeyholdingCompany/tkc-automated-testing')

runTests({
    'Statements': 80,
    'Branches': 80,
    'Functions': 80,
    'Lines': 80
}, [
    // This is a promise based step.
    asyncRunner({
        name: 'Step 1', task: async () => {}
    }),
    // This is a command based step.
    asyncRunner({
        name: 'Step 2', task: 'yarn test'
    }),
    asyncRunner({
        // Final step needs to have a text-summary output from either a package like nyc, or jest - this is how to builds the report and knows the coverage.
        name: 'Merging Results', task: 'nyc report -t coverage/merged --report-dir coverage/merged-report --reporter=text-summary',
        onData: (data) => {
            if (data) buildReportFromCLI(data);

        }
    })
]);

FAQs

Package last updated on 20 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc