@orion-js/models
Advanced tools
Comparing version 3.0.20 to 3.0.24
@@ -7,2 +7,3 @@ "use strict"; | ||
const index_1 = __importDefault(require("./index")); | ||
const resolvers_1 = require("@orion-js/resolvers"); | ||
it('should validate a schema', async () => { | ||
@@ -48,1 +49,26 @@ const model = (0, index_1.default)({ | ||
}); | ||
it('[regression test]: should allow correct doc cleaning for resolver params', async () => { | ||
const Point = (0, index_1.default)({ | ||
name: 'Point', | ||
schema: { | ||
latitude: { | ||
type: Number | ||
}, | ||
longitude: { | ||
type: Number | ||
} | ||
} | ||
}); | ||
const resolver1 = (0, resolvers_1.resolver)({ | ||
params: { | ||
point: { | ||
type: Point | ||
} | ||
}, | ||
async resolve({ point }) { | ||
return point; | ||
} | ||
}); | ||
const doc = await resolver1.resolve({ point: { latitude: '11', longitude: '12' } }); | ||
expect(doc).toEqual({ latitude: 11, longitude: 12 }); | ||
}); |
{ | ||
"name": "@orion-js/models", | ||
"version": "3.0.20", | ||
"version": "3.0.24", | ||
"main": "lib/index.js", | ||
@@ -21,3 +21,3 @@ "types": "lib/index.d.ts", | ||
"@orion-js/helpers": "^3.0.17", | ||
"@orion-js/resolvers": "^3.0.17", | ||
"@orion-js/resolvers": "^3.0.24", | ||
"@orion-js/schema": "^3.0.17" | ||
@@ -40,3 +40,3 @@ }, | ||
}, | ||
"gitHead": "ed37da2a1a61a9a4c0b9935d77e29d83a423e199" | ||
"gitHead": "5ac1c68e72af3dbeaf8eb5c2a04d5325da2a7e3f" | ||
} |
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
20495
561
Updated@orion-js/resolvers@^3.0.24