Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "joi-md-doc", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -133,8 +133,9 @@ const R = require('ramda'); | ||
ju.makeType, | ||
R.pipe(x => | ||
mdu.makeLink({ | ||
name: ju.findMeta('name')(x), | ||
filename: ju.findMeta('filename')(x), | ||
}), | ||
), | ||
R.pipe(x => { | ||
const filename = ju.findMeta('filename')(x); | ||
return mdu.makeLink({ | ||
name: R.defaultTo(filename, ju.findMeta('name')(x)), | ||
filename, | ||
}); | ||
}), | ||
), | ||
@@ -141,0 +142,0 @@ ), |
@@ -41,2 +41,21 @@ const joi = require('@hapi/joi'); | ||
it(`should support nested schemas/objects with no name meta tag`, () => { | ||
const joiSchema = { | ||
describe: () => ({ | ||
metas: [{ filename: 'parent' }], | ||
keys: { | ||
foo: { | ||
type: 'object', | ||
metas: [{ filename: 'child' }], | ||
keys: { | ||
foo: { type: 'number' }, | ||
}, | ||
}, | ||
}, | ||
}), | ||
}; | ||
expect(makeMarkdownByFilename(joiSchema)).toMatchSnapshot(); | ||
}); | ||
it(`should support list of single primitive type`, () => { | ||
@@ -43,0 +62,0 @@ const joiSchema = { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25359
667