Ghost/ghost/pretty-cli/test/pretty-cli.test.js
Hannah Wolfe 66f1ddcbe9 🎨 Update to use files array in package.json
- run `slimer fix package.json` to add a files array everywhere
- manually update slimer-cli to have a files array for bin
- manually update slimer to include commands or else this will break!!
- update pretty-cli to use our standard /lib/ pattern
- this means we only publish what we need to npm, and keeps things cleaner and safer
2018-11-29 16:04:13 +00:00

33 lines
988 B
JavaScript

// Switch these lines once there are useful utils
// const testUtils = require('./utils');
require('./utils');
const prettyCLI = require('../lib/pretty-cli');
// Check the API is as we depend on in other modules;
describe('API', function () {
it('Exposes styled-sywac, styles & the sywac API', function () {
// Detect a basic prestyled sywac instance
prettyCLI.should.be.an.Object().with.property('types');
prettyCLI.parseAndExit.should.be.a.Function();
// Detect the basic sywac Api
prettyCLI.Api.should.be.a.Function();
prettyCLI.Api.get.should.be.a.Function();
// Detect style rules
prettyCLI.styles.should.be.an.Object();
prettyCLI.styles.should.have.properties([
'usagePrefix',
'group',
'flags',
'hints',
'groupError',
'flagsError',
'descError',
'hintsError',
'messages'
]);
});
});