vue-styleguidist
Version:
Vue components style guide generator
25 lines (24 loc) • 866 B
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _path = _interopRequireDefault(require("path"));
var _processComponent = _interopRequireDefault(require("./processComponent"));
var config = {
configDir: __dirname,
getExampleFilename: function getExampleFilename(componentpath) {
return _path["default"].join(_path["default"].dirname(componentpath), 'Readme.md');
},
getComponentPathLine: function getComponentPathLine(componentpath) {
return componentpath;
}
};
describe('processComponent', function () {
it('processComponent() should return an object for section with content', function () {
var result = (0, _processComponent["default"])('pizza.js', config);
expect(result).toMatchObject({
slug: 'pizza',
module: {
require: 'pizza.js'
}
});
});
});