Skip to content

Instantly share code, notes, and snippets.

@leopic
Created August 11, 2018 00:12
Show Gist options
  • Save leopic/bee4aea99efeee998b01ff1dbb141d0a to your computer and use it in GitHub Desktop.
Save leopic/bee4aea99efeee998b01ff1dbb141d0a to your computer and use it in GitHub Desktop.
'use strict';
const lib = require('../../lib/index');
describe('Basic functionality', function () {
it('displays the help banner when no params are given', function () {
lib({})
.then(result => expect(result).toContain('Usage: makeappicon --base-icon ICON_PATH'))
.catch();
});
it('displays the help banner when the help flag is set to true', function () {
lib({helpFlag: true})
.then(result => expect(result).toContain('Usage: makeappicon --base-icon ICON_PATH'))
.catch();
});
it('should fail to find the icon', function () {
lib({iconPath: '/something.wrong.png'})
.catch(err => expect(err).toBe(1));
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment