showdown/test/bootstrap.js
Estevão Soares dos Santos 9f8c7199ea
feat(makehtml.events): implements event system refactor for converter.makeHtml (#919)
* startrefactoring the event system

* refactor: blockquotes, code blocks and links refactored

* refactor codeblock to new event system

* refactor subparser until ghcode to new events

* finish adating ghcodeblock to new event

* add headings to new events

* add image to event system

* add emphasisAndStrong to event system

* fix wrong event name in emphasisAndStrong onEnd event

* spanGamut and build

* showdown.helper.event refactored to showdown.Event

* partial

* add links

* add metadata

* add strikethrough and table

* build

* add underline

* add unescapeSpecialChars

* small refactoring

* remove old tables parser

* add lists

* add simple event trigger tests

* build

* fix browserstack

* fix browserstack

* remove testing for ie11 and bumped firefox min version to 45

* fixes and closes #920

* build
2022-04-27 21:42:24 +01:00

23 lines
591 B
JavaScript

//.webstorm.bootstrap.js
const chai = require('chai');
const fs = require('fs');
global.chai = chai;
global.expect = chai.expect;
global.showdown = require('../.build/showdown.js');
global.getDefaultOpts = require('./optionswp.js').getDefaultOpts;
// mock XMLHttpRequest for browser and node test
function XMLHttpRequest () {
this.responseText = null;
this.status = null;
this.open = function (mode, file) {
//mode is ignored, it's always sync
this.responseText = fs.readFileSync(file);
this.status = 200;
return this;
};
}
global.XMLHttpRequest = XMLHttpRequest;