bs-awesomize
Advanced tools
Comparing version 1.4.5 to 1.4.6
@@ -43,2 +43,24 @@ const Awesomize = require('../index'); | ||
}); | ||
describe('Sanitizer', () => { | ||
const schema = Awesomize.compile({ | ||
'foo': { | ||
read: ({ foo }) => foo, | ||
sanitize: (x) => x, | ||
validate: [ Awesomize.Validate.required ], | ||
}, | ||
}); | ||
it('should resolve with the value', (done) => { | ||
schema({ foo: 42 }) | ||
.then(result => { | ||
expect(result.awesomeResultType).toBe('Ok'); | ||
expect(result.messages).toBeNull(); | ||
expect(result.data.foo).toBe(42); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
}); | ||
@@ -45,0 +67,0 @@ |
{ | ||
"name": "bs-awesomize", | ||
"version": "1.4.5", | ||
"version": "1.4.6", | ||
"package-specs": { | ||
@@ -5,0 +5,0 @@ "module": "commonjs", |
{ | ||
"name": "bs-awesomize", | ||
"version": "1.4.5", | ||
"version": "1.4.6", | ||
"description": "A ReasonML implementation of the Awesomize validation and data scrubbing library.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
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
92791
1218