Skip to content
Snippets Groups Projects
Commit a5e97bf7 authored by Lars Trieloff's avatar Lars Trieloff
Browse files

Fix async issue in tests, fix missing pipe between Pattern and nullable

parent ba218180
Branches type-arrays
Tags
No related merge requests found
......@@ -31,8 +31,8 @@ This is an example schema that uses types defined in other schemas.
| [reflist](#reflist) | Simple | Optional | No | Complex References (this schema) |
| [refnamed](#refnamed) | Simple | Optional | No | Complex References (this schema) |
| [xor](#xor) | complex | Optional | No | Complex References (this schema) |
| `int.*` | `integer` | Pattern No | Complex References (this schema) |
| `str.*` | `string` | Pattern No | Complex References (this schema) |
| `int.*` | `integer` | Pattern | No | Complex References (this schema) |
| `str.*` | `string` | Pattern | No | Complex References (this schema) |
| `*` | any | Additional | Yes | this schema *allows* additional properties |
## and
......
......@@ -31,8 +31,8 @@ This is an example schema that uses types defined in other schemas.
| [reflist](#reflist) | Simple | Optional | No | Complex References (this schema) |
| [refnamed](#refnamed) | Simple | Optional | No | Complex References (this schema) |
| [xor](#xor) | complex | Optional | No | Complex References (this schema) |
| `int.*` | `integer` | Pattern No | Complex References (this schema) |
| `str.*` | `string` | Pattern No | Complex References (this schema) |
| `int.*` | `integer` | Pattern | No | Complex References (this schema) |
| `str.*` | `string` | Pattern | No | Complex References (this schema) |
| `*` | any | Additional | Yes | this schema *allows* additional properties |
## and
......
......@@ -6,7 +6,7 @@ beforeEach(function() {
jasmine.addMatchers(
require('jasmine-diff')(jasmine, {
colors: true,
inline: false
inline: true
})
);
});
......@@ -56,20 +56,16 @@ describe('Compare results', () => {
expect(code).toEqual(0);
const files = readdirSync('./spec/examples').filter(item => !(/(^|\/)\.[^\/\.]/g).test(item));
expect(files.length).toEqual(21);
done();
});
});
const files = readdirSync('./spec/examples').filter(item => !(/(^|\/)\.[^\/\.]/g).test(item));
files.forEach(file => {
if (statSync('./spec/examples/' + file).isFile()) {
it('Comparing ' + file, indone => {
console.log('file ' + file);
const expectedstr = readFileSync(path.resolve('./spec/examples/', file)).toString();
const actualstr = readFileSync(path.resolve('./examples/docs/', file)).toString();
expect(actualstr).toEqual(expectedstr);
indone();
files.forEach(file => {
if (statSync('./spec/examples/' + file).isFile()) {
const expectedstr = readFileSync(path.resolve('./spec/examples/', file)).toString();
const actualstr = readFileSync(path.resolve('./examples/docs/', file)).toString();
expect(actualstr).toEqual(expectedstr, file + ' does not match');
}
});
}
done();
});
});
});
......@@ -21,7 +21,7 @@
});
%><% _.keys(pprops).forEach(property => {
const schema = pprops[property]; %>
| `<%= property.replace(':', '') %>` | <%= schema.simpletype %> | Pattern <%= schema.nullable === true ? "Yes" : "No" %> |<% if(hasDefault) { %> <% if (schema.default!==undefined) { %>`<%- JSON.stringify(schema.default) %>`<% } %> |<% } %> <%
| `<%= property.replace(':', '') %>` | <%= schema.simpletype %> | Pattern | <%= schema.nullable === true ? "Yes" : "No" %> |<% if(hasDefault) { %> <% if (schema.default!==undefined) { %>`<%- JSON.stringify(schema.default) %>`<% } %> |<% } %> <%
if (schema.$oSchema) {
%>[<%= schema.$oSchema.$linkVal %>](<%= schema.$oSchema.$linkPath %>#<%= property.replace(':', '').toLowerCase() %>)<%
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment