New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

test-data-bot

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

test-data-bot - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

CHANGELOG.md

4

package.json
{
"name": "test-data-bot",
"version": "0.2.0",
"version": "0.3.0",
"description": "Generate test data for your tests easily.",

@@ -8,3 +8,3 @@ "engines": {

},
"main": "src.index.js",
"main": "src/index.js",
"scripts": {

@@ -11,0 +11,0 @@ "test": "jest"

@@ -56,1 +56,20 @@ # test-data-bot

```
## Hard coding values and overriding
Sometimes you might want to ensure a certain value, rather than use the generator. In this case you can pass it in when you call the builder:
```js
const userBuilder = build('User')
.fields({
name: fake(f => f.name.findName()),
email: sequence(x => `jack${x}@test.com`),
})
const user = userBuilder({ name: 'JACK' })
console.log(user)
// => { name: 'JACK', email: 'jack1@test.com' }
```
In this case, `name` will always be `'JACK'`, and the generator given will not be used.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc