You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
780 B
17 lines
780 B
const assert = require('assert');
|
|
const path = require('path');
|
|
const pkg = require(path.join(__dirname, '..', 'package.json'));
|
|
|
|
try {
|
|
assert.strictEqual(pkg.name, '@ansible/example', 'package name must be @ansible/example');
|
|
assert.ok(pkg.version && typeof pkg.version === 'string', 'version must be present');
|
|
assert.ok(pkg.author && pkg.author.includes('Sven'), 'author must be Sven Geboers');
|
|
assert.ok(pkg.publishConfig && pkg.publishConfig.access === 'public', 'publishConfig.access must be public');
|
|
assert.ok(Array.isArray(pkg.files), 'files array must exist');
|
|
console.log('test_package_json: OK');
|
|
process.exit(0);
|
|
} catch (err) {
|
|
console.error('test_package_json: FAILED');
|
|
console.error(err && err.message ? err.message : err);
|
|
process.exit(1);
|
|
}
|
|
|