|
@@ -3,7 +3,7 @@ import {format} from '@e22m4u/js-format';
|
|
|
import {validateProjectionSchemaDefinition} from './validate-projection-schema-definition.js';
|
|
import {validateProjectionSchemaDefinition} from './validate-projection-schema-definition.js';
|
|
|
|
|
|
|
|
describe('validateProjectionSchemaDefinition', function () {
|
|
describe('validateProjectionSchemaDefinition', function () {
|
|
|
- it('should require the schema definition to be an object', function () {
|
|
|
|
|
|
|
+ it('should require the "schemaDef" argument to be an object', function () {
|
|
|
const throwable = v => () => validateProjectionSchemaDefinition(v);
|
|
const throwable = v => () => validateProjectionSchemaDefinition(v);
|
|
|
const error = s =>
|
|
const error = s =>
|
|
|
format('Schema definition must be an Object, but %s was given.', s);
|
|
format('Schema definition must be an Object, but %s was given.', s);
|
|
@@ -20,7 +20,7 @@ describe('validateProjectionSchemaDefinition', function () {
|
|
|
throwable({name: 'mySchema', schema: {}})();
|
|
throwable({name: 'mySchema', schema: {}})();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- it('should require the name option to be a non-empty string', function () {
|
|
|
|
|
|
|
+ it('should require the "name" option to be a non-empty string', function () {
|
|
|
const throwable = v => () =>
|
|
const throwable = v => () =>
|
|
|
validateProjectionSchemaDefinition({name: v, schema: {}});
|
|
validateProjectionSchemaDefinition({name: v, schema: {}});
|
|
|
const error = s =>
|
|
const error = s =>
|
|
@@ -40,7 +40,7 @@ describe('validateProjectionSchemaDefinition', function () {
|
|
|
throwable('str')();
|
|
throwable('str')();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- it('should require the schema option to be an object', function () {
|
|
|
|
|
|
|
+ it('should require the "schema" option to be an object', function () {
|
|
|
const throwable = v => () =>
|
|
const throwable = v => () =>
|
|
|
validateProjectionSchemaDefinition({name: 'mySchema', schema: v});
|
|
validateProjectionSchemaDefinition({name: 'mySchema', schema: v});
|
|
|
const error = s =>
|
|
const error = s =>
|