2.0.0 • Published 19 days ago

@artstesh/forger v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
19 days ago

forger

A legal way to forge everything you want ;)

Description of the project

Legal way to forge anything ;)

Forger is designed to make it easier to write test code in terms of creating auto-generated objects/primitives, allowing the developer to focus on the really important things instead of inventing test data.

See details in Wiki

Overview

Forger is designed to save the developer from manually creating numerous test data, saving time and not littering the code with declarations of data that is not important for the test, thus facilitating both writing and reading tests.

Consider a small example:

// interface Student {name: string, age: number}
describe('student.service', () => {
   it('save success', () => {
      const student = Forger.create<Student>();
      //
      const result = studentService.save(student);
      //
      console.log(student) // { name: 'I8SE1ou3ZD', age: 345 }
      should().true(result);
   })
});

The point of this simple test is to check the result of the response of a certain service. For us, it does not matter at all what specific data will be transferred inside the student. In the absence of Forger, the developer would be forced to manually write some kind of stub, furthermore creating uncertainty for the reader about the importance of this data. With Forger, the test contains only the data that is really important to it.

License

This project is licensed under the MIT License

2.0.0

19 days ago

1.2.6

3 months ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.10

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago