# create-test-users

> Create test couch profiles for use in testing authenticated web services which use the

Latest version **1.0.1** (published 2013-03-14) · BSD license · 0 weekly downloads

## Install

```sh
npm install create-test-users
pnpm add create-test-users
yarn add create-test-users
bun add create-test-users
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2013-03-14 |
| First published | 2013-03-12 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Noah Isaacson |
| Maintainers | clewfirst |
| Keywords | couch, couchdb, profiles, test |

## Links

- npm: https://www.npmjs.com/package/create-test-users
- Repository: https://github.com/nisaacson/create-test-users
- npm.io page: https://npm.io/package/create-test-users

## Dependencies (4)

- [async](https://npm.io/package/async.md) ~0.2.6
- [bcrypt-nodejs](https://npm.io/package/bcrypt-nodejs.md) 0.0.3
- [couch-profile](https://npm.io/package/couch-profile.md) ~1.0.15
- [required-keys](https://npm.io/package/required-keys.md) ~1.0.4

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2013-03-14
- 1.0.0 — 2013-03-12

## README

# Create Test Users
Create test couch profiles for use in testing authenticated web services which use the [couch-profile](https://github.com/nisaacson/couch-profile) module

# Installation
```bash
npm install create-test-users
```

# Usage
```javascript
var inspect = require('eyespect').inspector()
var path = require('path')
var createTestUsers = require('create-test-users')
var jsonFilePath = path.join(__dirname, 'test/users.json')
var usersData = JSON.parse(fs.readFileSync(jsonFilePath, 'utf8'))
var config = require('nconf').env().argv().defaults({
  bcrypt: {
    rounds: 12
  }
})

// make sure the created profiles password match the input data
var confirmPasswordsMatch = true
var data = {
  db: <cradle db connection here>,
  remove: true, // remove existing first users or not,
  config: config,
  usersData: usersData,
  confirmPasswordsMatch: confirmPasswordsMatch
}
createTestUsers(data, function(err, reply) {
  if (err) {
    inspect(err, 'error creating test users')
    return
  }
  inspect(reply, 'created test users successfully')
})
```

---
_Source: https://npm.io/package/create-test-users · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
