md-generator
Version:
NPM Package which bootstraps Development by creating all required .md files to meet community standards.
59 lines (58 loc) • 2.6 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var alerts_1 = require("../alerts");
var chai_1 = require("chai");
var alert_mock_1 = tslib_1.__importDefault(require("./mock/alert.mock"));
exports.default = describe('test functions in common/alert', function () {
it('should log arguments to the console', function () {
var logData = alerts_1.log('print', 'hello', 'world');
chai_1.expect(logData).to.equal(undefined);
});
it('should call the useBox', function () {
var logData = alerts_1.useBox('print');
chai_1.expect(logData).to.equal(undefined);
});
it('should call showEndMessage', function () {
var logData = alerts_1.showEndMessage('print', 'hello', 'world');
chai_1.expect(logData).to.equal(undefined);
});
it('should call customHelp', function () {
var logData = alerts_1.customHelp();
chai_1.expect(logData).to.equal(undefined);
});
it('should call wrongCommandAlert', function () {
var logData = alerts_1.wrongCommandAlert();
chai_1.expect(logData).to.equal(undefined);
});
it('should call noCommandAlert', function () {
var logData = alerts_1.noCommandAlert();
chai_1.expect(logData).to.equal(undefined);
});
it('should trigger spinner', function () {
var logData = alerts_1.spinner('hello');
chai_1.expect(logData.options.text).to.equal('hello');
});
it('should cast Elements ToFormated String', function () {
var logData = alerts_1.castElementsToFormatedString(alert_mock_1.default);
chai_1.expect(logData[5]).to.equal('-');
});
it('should trigger fileNotDetectedAlert', function () {
var logData = alerts_1.fileNotDetectedAlert();
chai_1.expect(logData).to.equal(undefined);
});
it('should trigger unrecognizedFileAlert', function () {
var logData = alerts_1.unrecognizedFileAlert(alert_mock_1.default);
chai_1.expect(logData).to.equal(undefined);
});
it('should trigger useHelpAlert', function () {
var logData = alerts_1.useHelpAlert();
chai_1.expect(logData).to.equal(undefined);
});
it('should log link to github', function () {
var messageWithParameters = alerts_1.checkCommunityStandardMet('username', 'project');
chai_1.expect(messageWithParameters).to.equal(undefined);
var messageWithoutParameters = alerts_1.checkCommunityStandardMet();
chai_1.expect(messageWithoutParameters).to.equal(undefined);
});
});