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

bifrost-bench

v1.0.3

Published

BifröstBench is a streamlined MicroTesting library inspired by the mythological Bifröst bridge, symbolizing the connection between simplicity in testing and comprehensive code validation. This library empowers developers to write a single, template-based

Downloads

307

Readme

BifröstBench: Streamlined MicroTesting Library

BifröstBench is a streamlined MicroTesting library inspired by the mythological Bifröst bridge, symbolizing the connection between simplicity in testing and comprehensive code validation. This library empowers developers to write a single, template-based unit test for each function, promoting clarity and precision in the testing process.


BifrostBench : Outil de Test pour TypeScript

Introduction

BifrostBench est une bibliothèque de test conçue pour simplifier et rationaliser le processus de test en TypeScript. Elle offre des fonctionnalités pour gérer les variances de test, exécuter des suites de tests avec différentes entrées, et vérifier les résultats attendus.

Fonctionnalités

  • Gestion des Variances de Test : Permet de tester une fonction avec différentes variations d'entrée et de sortie attendue.
  • Suites de Tests : Exécute une série de tests basés sur une liste prédéfinie de cas de test.
  • Vérification des Résultats : Fournit des méthodes pour vérifier si le résultat du test correspond aux attentes.

Utilisation

Variances de Test

Pour tester une fonction avec différentes variations d'entrée et de sortie, utilisez BifrostBench.variances.

BifrostBench.variances<Input, Output>(
    description: string,
    template: FixtureObject<Input, Output>,
    variances: Array<FixtureVariances<Input, Output>>,
    callback: BifrostBenchCallback<Input, Output>
);

Suites de Tests

Pour exécuter une série de tests basée sur une liste prédéfinie de cas de test, utilisez BifrostBench.listSuite.

BifrostBench.listSuite<Input, Output>(
    description: string,
    list: Array<FixtureObject<Input, Output>>,
    callback: BifrostSimpleBenchCallback<Input, Output>
);

Exemple d'Utilisation

// Exemple d'utilisation de BifrostBench.variances
BifrostBench.variances(
    "Description du Test",
    new FixtureObject<InputType, OutputType>(/* paramètres */),
    [/* variances */],
    async (objTest) => {
        // Logique de test
    }
);

// Exemple d'utilisation de BifrostBench.listSuite
BifrostBench.listSuite(
    "Description de la Suite de Test",
    [/* Liste de FixtureObject */],
    async (objTest) => {
        // Logique de test
    }
);

Récupération d'une Liste de Cas de Test

Utilisez BifrostBench.getList pour récupérer une liste de cas de test basée sur un tableau de configurations.

BifrostBench.getList<Input, Output>(obj: Array<any>): Array<FixtureObject<Input, Output>>;

Contribution

N'hésitez pas à contribuer à ce projet en proposant des améliorations, en signalant des bugs ou en soumettant des pull requests.