2015-06-08 02:02:45 +08:00
|
|
|
/**
|
|
|
|
* Created by Estevao on 06-06-2015.
|
|
|
|
*/
|
|
|
|
require('source-map-support').install();
|
|
|
|
var expect = require('chai').expect,
|
2015-07-12 02:32:22 +08:00
|
|
|
showdown = require('../bootstrap').showdown;
|
2015-06-08 02:02:45 +08:00
|
|
|
|
|
|
|
describe('showdown legacy extension support', function () {
|
|
|
|
'use strict';
|
|
|
|
var extObjMock =
|
|
|
|
{
|
|
|
|
type: 'lang',
|
|
|
|
filter: function () {}
|
|
|
|
},
|
|
|
|
extFunc = function () {
|
|
|
|
return [extObjMock];
|
|
|
|
};
|
|
|
|
|
|
|
|
it('accept extensions loaded by the old mechanism', function () {
|
|
|
|
showdown.extensions.bazinga = extFunc;
|
|
|
|
var cnv = new showdown.Converter({extensions: ['bazinga']});
|
|
|
|
expect(cnv.getAllExtensions().language).to.eql([extObjMock]);
|
|
|
|
});
|
|
|
|
});
|