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 🙏

© 2026 – Pkg Stats / Ryan Hefner

oral-ts

v1.0.2

Published

a testing framework for typescript

Readme

@ral

an open source decorator based testing framework for typescript

features

  • decorator based testing
  • watch mode
  • async tests with not efforts

install

currently this repo is not released yet so you have to fork and clone the repo before using it. run npm install run cd examples && npm install run oral

how to write tests in oral

writing tests in oral is same as writing tests in other framework but in oral, there is no describe and no it, instead of that, it usesname of you class as description of you tests. To get started with it touch oral.config.ts && mkdir tests

  • oral.config.ts
module.export = {
  testDir: "/tests",
};

cd tests && touch firstTest.test.ts

inside firstTest.test.ts

import { Suit, Equal } from "oral";

@Suite()
export class myFirstTest {
  @Equal("this should pass")
  thisShouldPass() {
    return "this should pass";
  }

  @Equal(5)
  thisShouldFail() {
    return 2 + 2;
  }
}

save and run oral --watch

output

and here you go..

cli options

oral location of config file --watch --testDir /tests/ --clear --noclear --help --version --notify --file name_of_file all cli options can be inclue in oral.config.ts

Api

@Equal() @Suite() @Contain() @Match() @True() @False() @GreaterThan() @LessThan() @Instanceof() @Typeof() @Extend() @Before() @After() @Util() @BeforeEach() @AfterEach() more coming soon. detailed examples in example/tests folder... continue reading to know more...

@Before() and @After()

import { Suite, Before, After, Equal } from "oral";
@Suite()
export class beforeAfterTest {
  name: string;
  @Before()
  before() {
    this.name = "a name";
    // create connection
  }

  @Equal("a name")
  shouldReturnName() {
    return this.name;
  }

  @After()
  after() {
    this.name = undefied;
    // drop database
  }
}

@Util()

import { Util, Suit, GreaterThan } from "oral";
@Suite()
export class utilTest {
  @Util()
  @GreaterThan(5)
  aUtil(num1: number, num2: number) {
    return num1 + num2;
  }

  realTest() {
    this.aUtil();
  }
}

beforeEveryone & afterEveryone

do not support in new version currenly, available soon !!! git checkout old to use this

  • oral.config.ts
function Afunc() {
  // create database
  return "a global string";
}
module.export = {
  beforeEveryone: Afunc,
};
  • aTest.test.ts
import { Suite, Equal } from "oral";
@Suite()
export class aTest {
  str: string;
  constructure(str: string) {
    this.str = str; // aFunc's returned value
  }

  @Equal()
  checkIfStrExist() {
    return this.str;
  }
}

@Extend()

import { Extend, Suite } from "oral";

const decoratorFunc = (val: string) => {
  if (val === "a string") return true;
  return false;
};

@Suite()
export class extendDecoratorTest {
  @Extend("my own decorator", decoratorFunc)
  extendDecoratorTesting() {
    return "a string";
  }

  @Extend("my own decorator", decoratorFunc)
  extendDecoratorTestingFail() {
    return "a false string";
  }
}

@BeforeEach() & @AfterEach()

import { Suite, Equal, BeforeEach, AfterEach } from "oral";

@Suite()
export class beforeEveryone {
  num = 0;
  @BeforeEach()
  beforeEach() {
    this.num = this.num + 1;
  }
  @AfterEach()
  beforeEach() {
    this.num = 0;
  }
  @Equal(1)
  checkIfEqualOne() {
    return this.num;
  }

  @Equal(1)
  checkIfEqualOneAgain() {
    return this.num;
  }
}

philosophy

Hello 🙂 i am tanay pingalkar. I like to code things that helps other and are open and free. I have created this testing framework for using the power of decorators and to give testers a complete new exciting workflow. This framework is typescript specific and dedicated to it. This framework believe that every assertion counts the quality of software and thats why every method in a class is a assertion. I currently dont have a good name but I call it "oral" (@ral) for some reason. Suggestion for name is needed. This project is open source and Licensed under MIT License. I will like to see feedback and ideas on github issues to make it better.

contribution

this porject is open source and will always live open source. Contributer's are highly welcome and appreciated. You can read CONTRIBUTING.md and CODE_OF_CONDUCT.md to know more about contribution process.