Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should provide model unit test shortcut blocks #11

Open
lykmapipo opened this issue Oct 18, 2018 · 0 comments
Open

Should provide model unit test shortcut blocks #11

lykmapipo opened this issue Oct 18, 2018 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@lykmapipo
Copy link
Owner

TBD:

const { validate, validateRequired, validateUnique } = require('mongoose-rest-actions/tests');
describe('Validation', () => {
  validate('User')('name', (error) => { /*assertions*/ });
  //expect('user', 'name', 'be required', (error) => { /*assertions*/ });
  validateRequired('User')('name', 'age');
  validateUnique('User')('name');
});
...
@lykmapipo lykmapipo added the enhancement New feature or request label Oct 18, 2018
@lykmapipo lykmapipo self-assigned this Apr 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant