@zeit/schemas
Advanced tools
Comparing version 2.7.0 to 2.8.0
@@ -0,1 +1,2 @@ | ||
const {Service} = require('./service'); | ||
const {EnvKeys, EnvObject} = require('./config-env'); | ||
@@ -140,4 +141,5 @@ const staticSchema = require('./config-static'); | ||
pattern: 'c.125-m512|c1-m4096|staging-*' | ||
} | ||
}, | ||
'service': Service | ||
} | ||
}; |
{ | ||
"name": "@zeit/schemas", | ||
"version": "2.7.0", | ||
"version": "2.8.0", | ||
"description": "All schemas used for validation that are shared between our projects", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -291,1 +291,35 @@ /* eslint camelcase: 0 */ | ||
}; | ||
exports.test_service_invalid = () => { | ||
const isValid = ajv.validate(deploymentConfigSchema, { | ||
service: 'foo' | ||
}); | ||
assert.equal(isValid, false); | ||
}; | ||
exports.test_service_port_valid = () => { | ||
const isValid = ajv.validate(deploymentConfigSchema, { | ||
service: { | ||
port: 80 | ||
} | ||
}); | ||
assert.equal(isValid, true); | ||
}; | ||
exports.test_service_port_invalid = () => { | ||
const isValid = ajv.validate(deploymentConfigSchema, { | ||
service: { | ||
port: 0 | ||
} | ||
}); | ||
assert.equal(isValid, false); | ||
}; | ||
exports.test_service_port_invalid_type = () => { | ||
const isValid = ajv.validate(deploymentConfigSchema, { | ||
service: { | ||
port: '3000' | ||
} | ||
}); | ||
assert.equal(isValid, false); | ||
}; |
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
73865
15
794