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 🙏

© 2025 – Pkg Stats / Ryan Hefner

skeletest

v0.5.3

Published

test skeleton creator

Downloads

345

Readme

skeletest

test skeleton creator

optional config

You can change default configuration via .skeletest.json file:

{
	"srcFolderName": "src",                 // default: "src"
	"filesExtension": "ts",                 // default detects: "ts" for typescript and "js" for javascript
	"testFolderName": "test",               // default: "test"
	"testFileExtensionPrefix": "spec",      // default detects: "spec" for typescript and "test" for javascript

	"considerVueFiles": true,               // default: false - if true, skeletest checks for test files matching .vue files
	"considerCyTestFiles": true,            // default: false - if true, skeletest considers test files with .cy extension
	"useVitest": true,                      // default: false - if true, skeletest uses vitest describe and it for "it.todo"
	"includeJsonFiles": true,               // default: false - if true, skeletest creates skeleton test files for .json files as well
	"ignoreMocksFolder": false,             // default: true - if true, skeletest ignores files in all __mocks__ folders

	"ignoreSrcFiles": ["file1.ts"...],      // ignore these source files - default: []
	"ignoreTestFiles": ["file3.spec.ts"...] // ignore these test files - default: []
}

help

skeletest -h

Output:

C:\git\github\skeletest> skeletest -h
Usage: index [options]

Create test skeleton.
Use .skeletest.json config file to override default settings.

Options:
  -V, --version          output the version number
  -f, --fix              Fix missing test files (default: false)
  -c, --config <config>  Alternative config file (must be .json) (default: ".skeletest.json")
  -h, --help             display help for command

run skeletest check

skeletest

Output:

C:\git\github\skeletest> skeletest

Use .skeletest.json config file to override default settings.

Wrong test files:
┌───┬────────────────────────────┬──────────────────────────────────┐
│ # │ File                       │ Path                             │
├───┼────────────────────────────┼──────────────────────────────────┤
│ 1 │ check.folder.spec.ts       │ C:\git\github\skeletest\test\bla │
│ 2 │ check.folder.spec.ts       │ C:\git\github\skeletest\test     │
│ 3 │ get.table.of.files.spec.ts │ C:\git\github\skeletest\test     │
└───┴────────────────────────────┴──────────────────────────────────┘

Missing test files:
┌────┬─────────────────────────────────────┬────────────────────────────────────────┐
│ #  │ File                                │ Path                                   │
├────┼─────────────────────────────────────┼────────────────────────────────────────┤
│ 1  │ check.folder.spec.ts                │ C:\git\github\skeletest\test\functions │
│ 2  │ convert.files.to.objects.spec.ts    │ C:\git\github\skeletest\test\functions │
│ 3  │ fix.extension.spec.ts               │ C:\git\github\skeletest\test\functions │
│ 4  │ get.config.spec.ts                  │ C:\git\github\skeletest\test\functions │
│ 5  │ get.files.listing.spec.ts           │ C:\git\github\skeletest\test\functions │
│ 6  │ get.table.from.file.objects.spec.ts │ C:\git\github\skeletest\test\functions │
│ 7  │ get.table.of.files.spec.ts          │ C:\git\github\skeletest\test\functions │
│ 8  │ get.timestamp.spec.ts               │ C:\git\github\skeletest\test\functions │
│ 9  │ skeletest.spec.ts                   │ C:\git\github\skeletest\test           │
│ 10 │ process.spec.ts                     │ C:\git\github\skeletest\test           │
└────┴─────────────────────────────────────┴────────────────────────────────────────┘

run skeletest check and fix

Use the -f option to have skeletest fix your test files

skeletest -f

Output:

C:\git\github\skeletest> skeletest -f

Use .skeletest.json config file to override default settings.


Wrong test files:
┌───┬────────────────────────────┬──────────────────────────────────┐
│ # │ File                       │ Path                             │
├───┼────────────────────────────┼──────────────────────────────────┤
│ 1 │ check.folder.spec.ts       │ C:\git\github\skeletest\test\bla │
│ 2 │ check.folder.spec.ts       │ C:\git\github\skeletest\test     │
│ 3 │ get.table.of.files.spec.ts │ C:\git\github\skeletest\test     │
└───┴────────────────────────────┴──────────────────────────────────┘

Missing test files:
┌────┬─────────────────────────────────────┬────────────────────────────────────────┐
│ #  │ File                                │ Path                                   │
├────┼─────────────────────────────────────┼────────────────────────────────────────┤
│ 1  │ check.folder.spec.ts                │ C:\git\github\skeletest\test\functions │
│ 2  │ convert.files.to.objects.spec.ts    │ C:\git\github\skeletest\test\functions │
│ 3  │ fix.extension.spec.ts               │ C:\git\github\skeletest\test\functions │
│ 4  │ get.config.spec.ts                  │ C:\git\github\skeletest\test\functions │
│ 5  │ get.files.listing.spec.ts           │ C:\git\github\skeletest\test\functions │
│ 6  │ get.table.from.file.objects.spec.ts │ C:\git\github\skeletest\test\functions │
│ 7  │ get.table.of.files.spec.ts          │ C:\git\github\skeletest\test\functions │
│ 8  │ get.timestamp.spec.ts               │ C:\git\github\skeletest\test\functions │
│ 9  │ skeletest.spec.ts                   │ C:\git\github\skeletest\test           │
│ 10 │ process.spec.ts                     │ C:\git\github\skeletest\test           │
└────┴─────────────────────────────────────┴────────────────────────────────────────┘

Fix is set to true. Fixing what I can...


Creating all missing folders...
 - Checking C:\git\github\skeletest\test\functions ...
 - Checking C:\git\github\skeletest\test ...
Done.

Files I can move:
┌───┬────────────────────────────┬──────────────────────────────┬────────────────────────────────────────┐
│ # │ File                       │ Path                         │ New Path                               │
├───┼────────────────────────────┼──────────────────────────────┼────────────────────────────────────────┤
│ 1 │ get.table.of.files.spec.ts │ C:\git\github\skeletest\test │ C:\git\github\skeletest\test\functions │
└───┴────────────────────────────┴──────────────────────────────┴────────────────────────────────────────┘

Moving files...
 - Moving get.table.of.files.spec.ts from C:\git\github\skeletest\test to C:\git\github\skeletest\test\functions ...
Done.

Creating files...
 - Creating C:\git\github\skeletest\test\functions\check.folder.spec.ts ...
 - Creating C:\git\github\skeletest\test\functions\convert.files.to.objects.spec.ts ...
 - Creating C:\git\github\skeletest\test\functions\fix.extension.spec.ts ...
 - Creating C:\git\github\skeletest\test\functions\get.config.spec.ts ...
 - Creating C:\git\github\skeletest\test\functions\get.files.listing.spec.ts ...
 - Creating C:\git\github\skeletest\test\functions\get.table.from.file.objects.spec.ts ...
 - Creating C:\git\github\skeletest\test\functions\get.table.of.files.spec.ts ...
 - Creating C:\git\github\skeletest\test\functions\get.timestamp.spec.ts ...
 - Creating C:\git\github\skeletest\test\skeletest.spec.ts ...
 - Creating C:\git\github\skeletest\test\process.spec.ts ...
Done.

Files I could NOT move:
┌───┬──────────────────────┬──────────────────────────────────┬────────────────────────────────────────┐
│ # │ File                 │ Path                             │ New Path                               │
├───┼──────────────────────┼──────────────────────────────────┼────────────────────────────────────────┤
│ 1 │ check.folder.spec.ts │ C:\git\github\skeletest\test\bla │ C:\git\github\skeletest\test\functions │
│ 2 │ check.folder.spec.ts │ C:\git\github\skeletest\test     │ C:\git\github\skeletest\test\functions │
└───┴──────────────────────┴──────────────────────────────────┴────────────────────────────────────────┘

skeletest generated file

For a given file, eg. check.folder.ts, skeletest will generate a check.folder.spec.ts file, with the following content:

describe('check.folder.ts tests', () => {
	it('should be implemented');
});