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

testus

v1.1.2

Published

A Test Kit for Vee

Downloads

4

Readme

Introduction

A Test Kit for Vee

testus is a Test Kit in Front End, which can help Developers to TEST your own projects. We concern multiple kinds of tests, such as Unit Test, Integration Test and E2E Test (UI Test), which can cover most of your test case for Front End.

Feature

  1. Support parse notation to get what you wanna test;

  2. Support testus.config.js to customize your own options;

  3. Support vscode icons for testus.config.js to beautify your IDE;

  4. Support cli plugin to perform your Develop Experience. Officially, we only support plugin for our own cli but you can customize your plugin which we expose a plugin api.

Installation

npm install testus

Quick Start

In your root directory, you'd better to create a testus.config.js. If we can't find testus.config.js in your root directory, we set a default configuration:

module.exports = {
    entry: {
        // path which you want to observe based to the root directory
        dirPath: '',
        // what types file you want to watch
        extFiles: ['js'],
        // file or directory which you want to ignore
        excludes: [],
    },
    output: {
        // path which you want to export based to the root directory
        dirPath: 'tests',
        // you want to generate a test file whose middle name you want to define
        middleName: 'spec',
    },
    options: {
        // test libraries you want to test, which supports jest, jasmine and karma right now
        libName: 'jest',
        // test libraries' config, such as jest.config.js, jasmine.config.json and karma.conf.js
        libConfig: {

        }
    },
    // plugin should be a function, which must return a next(ctx) in your plugin params, such as: (ctx, next) => next(ctx)
    plugins: [

    ]
}

Notation

If you want to generate a test file related to your code, you'd better to write a notation in your code. We cite an instance like this:

/**
 * @testus 
 * @name sum
 * @description test sum function
 * @param a 1
 * @param b 2
 * @return 3
 * @testus
 */
const sum = (a,b) => a+b;

/**
 * @end
 */
module.exports = {
    sum
}

we can parse @testus from your code, which you must use @testus closing your notation that can be filtered in our platform. More importantly, you have to write an @end to let us know what you want to export, which now only support Common JS Module.

|Notation|Closing|Description| |:-:|:-:|:-:| |@testus|yes|offer a scope that need to parse| |@name|no|an export refer which you want to test| |@description|no|an description which you want to describe| |@param|no|a param which you want to input in your function or sth| |@return|no|a return which you want to return in your function or sth| |@end|no|offer a module.exports|

Plugins

|Project|Description| |:-:|:-:| |testus-plugin-jest |jest plugin| |testus-plugin-karma |karma plugin| |testus-plugin-jasmine |jasmine plugin|

Document

License

MIT

Copyright (c) Vee