We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5470d8a commit 428d9f2Copy full SHA for 428d9f2
spec/validators/model.spec.js
@@ -0,0 +1,24 @@
1
+
2
+/**
3
+ * How do I test this?
4
+ *
5
+ * Since Model validator is a very close to the core validator, and it needs
6
+ * the validator to be running on top of a "modelate" object, I don't know how
7
+ * to test this in an appropiate way.
8
9
+ * Lot of things to think about.
10
+ */
11
12
+const valid = require('../../lib/validators/model');
13
14
+describe(' - Model validator', () => {
15
+ it('shall be a function', () => {
16
+ expect(typeof valid).toEqual('function');
17
+ });
18
19
+ it('shall not validate a inexistent model', () => {
20
+ const resp = valid({name: ''}, {model: 'MyTestModel'});
21
+ expect(resp).toEqual(false);
22
23
24
+});
0 commit comments