1.0.0 • Published 5 months ago

fortepiano v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

fortepiano ˌfɔrteˈpjaːno

Playing actual music over fp-ts notes 🎶

GitHub Workflow Status Codecov GitHub npm

Description

Fortepiano is a mocking library for TypeScript. It promotes immutability, composability and purity, making it ideal for projects that embrace functional programming principles.

Getting Started

Installation

To install the stable version:

npm install fortepiano

or using yarn:

yarn add fortepiano

Usage

Fortepiano uses a functional API to create and configure mocks, encouraging pure function usage and immutable mock objects.

Here's an example:

import { $mock } from 'fortepiano'

interface User {
  firstName: string
  lastName: string
}

export const UserMock = (): $mock.Mock<User> =>
  $mock.struct({
    firstName: $mock.string,
    lastName: $mock.string,
  })

console.log(UserMock()()()) // Output: { firstName: 'randomString', lastName: 'randomString' }

Contributing

See the CONTRIBUTING.md file for details.

Authors

License

This project is licensed under the MIT License. See the LICENSE.md file for details.

1.0.0

5 months ago

0.1.9

1 year ago

0.1.8

2 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.1-rc.1

3 years ago

0.1.0

3 years ago