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

react-development-test-component

v0.1.15

Published

This React development tool provides a convenient interface for running and monitoring test cases. It allows you to execute individual test functions, run all tests multiple times, and focus on failed tests for debugging purposes. ## Prerequisites ๐Ÿ› ๏ธ

Downloads

10

Readme

React Test Development Tool ๐Ÿš€

This React development tool provides a convenient interface for running and monitoring test cases. It allows you to execute individual test functions, run all tests multiple times, and focus on failed tests for debugging purposes.

Prerequisites ๐Ÿ› ๏ธ

Before using this library, ensure that you have the following dependencies installed:

  • Node.js - Node.js runtime environment.
  • npm or Yarn - Package managers for installing and managing dependencies.

Installation ๐Ÿ› ๏ธ

To use this library in your React project, follow these steps:

  1. Install the package using npm or yarn:

    npm i react-development-test-component
    yarn add react-development-test-component
  2. Import the necessary components into your project:

    import DevelopmentTool from 'react-development-test-component';

Usage โ„น๏ธ

DevelopmentTool Component

The DevelopmentTool component renders a user-friendly interface for running tests and handling login credentials (if required). It accepts the following props:

  • testFunctions: An array of functions representing test cases.
  • loginFetch: The function to handle login form submission.

Example usage:

import React from 'react';
import DevelopmentTool from 'react-development-test-component';

const MyComponent = () => {
  // Define test functions
  const testFunctions = [
    // Define your test functions here
  ];

  // Function to handle login form submission
  const handleLoginFetch = (username, password) => {
    // Implement your login logic here
  };

  return (
    <DevelopmentTool testFunctions={testFunctions} loginFetch={handleLoginFetch} />
  );
};

export default MyComponent;

TestRunnerComponent

The TestRunnerComponent is an internal component used by the DevelopmentTool for executing and displaying test results. It can also be used independently if needed. It accepts the following props:

  • testFunctions: An array of functions representing test cases.

Example usage:

import React from 'react';
import TestRunnerComponent from 'react-development-test-component';

const MyTestRunner = () => {
  // Define test functions
  const testFunctions = [
    // Define your test functions here
  ];

  return (
    <TestRunnerComponent testFunctions={testFunctions} />
  );
};

export default MyTestRunner;

Features ๐ŸŒŸ

  • Run All Tests: Execute all test functions a specified number of times.
  • Run Only Failed Tests: Run only the tests that have failed in previous executions.
  • Test Results: View detailed test results, including test names, states (correct or incorrect), and messages.

Contributing ๐Ÿค

Contributions are welcome! If you encounter any issues or have suggestions for improvement, please open an issue on the GitHub repository.

License ๐Ÿ“

This project is licensed under the MIT License - see the LICENSE file for details.