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

@autometa/runner

v0.6.4

Published

[Full Docs](https://bendat.github.io/autometa/docs/cucumber/test_runner/intro/)

Downloads

406

Readme

Autometa

Full Docs

NOTICE

Autometa is under construction. It is currently unstable, poorly documented and not production ready for most cases.

Check back soon.

The following libraries may be considered relatively stable, but may contain bugs or unclear errors

  • Overloaded - Function and method overloads that are as pleasant to make as they are to use
  • Bind Decorator - Binds the this keyword on a class method. Respectfully a fork of bind-decorator
  • Status Codes - Object containing HTTP status codes and status messages, visible in the editor via as const

Autometa

Autometa is an early-development automation framework toolkit, which provides libraries to help automate the automation process on node with libraries to help bootstrap your node automation framework, for API or E2E testing.

Full Docs

Cucumber Runner

The Cucumber Runner lets you build and execute Cucumber style tests with alternative test runners. Currently supported are jest.

Initially inspired by jest-cucumber provides a customizable hybrid approach between cucumbers flat global steps and jest-cucumbers nested spec-like tests.

Dependency injection is supported to make initializing client classes needed to interface with your service or website simple and logic-free, with unique copies provided to each executing tests.

import { Feature, Given, When, Then, Before } from "@autometa/runner";
import { App } from "./my-app";
import * as seedData from "./seed-data";

Before("Seed the database", async ({ dbClient }: App) => {
  await dbClient.seed(seedData);
});
Given("a user who wants to log in", () => {});
When("a user submits their credentials", () => {});
Then("a user sees their", () => {});

// tests assembled automatically
Feature("./my-feature.feature");

Steps can also be nested or groups to override higher level steps.

import {
  Feature,
  Given,
  When,
  Then,
  Before,
  ScenarioOutline,
  Scenario,
  Rule,
} from "@autometa/runner";
import { App } from "./my-app";
import * as seedData from "./seed-data";

Before("Seed the database", async ({ dbClient }: App) => {
  await dbClient.seed(seedData);
});
Given("a user who wants to log in", () => {});
When("a user submits their credentials", () => {});

Feature(() => {
  Scenario("a user logs in successfully", () => {
    Then("a user sees their profile", () => {});
  });

  Scenario("a user cannot log in without a password", () => {
    Then(
      "a user is informed they cannot log in",
      (expectedError: string) => {}
    );
  });
  Rule("a rule", () => {
    ScenarioOutline("some outline", () => {
      // define steps unique to `some outline`
    });
  });
}, "./my-feature.feature");

Dto Builder

Implementation of the Builder pattern that allows automatically generating builder classes from a DTO class prototype, with type-safe builder methods in place of DTO properties.

import { dto, Builder } from '@autometa/dto-builder'
export class UserDto {
    id: number
    username: string,
    // default values, factories, dtos
    @DTO.dto(AddressDto)
    address: AddressDto
    @DTO.date()
    createdAt: Date
}
// or
// avoid duplicating interface properties
export class UserDto extends DTO<IUser> {}

const UserDtoBuilder = Builder(UserDto);

const user = new UserDtoBuilder().id(1).name('bob').build()

// compilation error, 'first argument of "id" must be a number"
 new UserDtoBuilder().id('1').name('bob').build()
 // force it to pass a string
 new UserDtoBuilder().id('1' as unknown as number).name('bob').build()