mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-17 16:15:22 +00:00
22 lines
529 B
JavaScript
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();
|
|
});
|
|
});
|
|
|
|
});
|