Files
gitbook/lib/plugins/__tests__/validatePlugin.js
T
Samy Pessé 4336fdb241 Base
2016-04-22 11:00:21 +02:00

22 lines
529 B
JavaScript

jest.autoMockOff();
var Promise = require('../../utils/promise');
var Plugin = require('../../models/plugin');
describe('validatePlugin', function() {
var validatePlugin = require('../validatePlugin');
pit('must not validate a not loaded plugin', function() {
var plugin = Plugin.createFromString('test');
return validatePlugin(plugin)
.then(function() {
throw new Error('Should not be validate');
}, function(err) {
return Promise();
});
});
});