test(browser): clean up unused code + keep rendered resources
This commit is contained in:
parent
0878841b0f
commit
7d0e8dabe0
|
@ -1,33 +1,21 @@
|
|||
var fs = require('fs');
|
||||
|
||||
var BpmnModel = require('bpmn-moddle'),
|
||||
Modeler = require('../../../lib/Modeler');
|
||||
var Modeler = require('../../../lib/Modeler');
|
||||
|
||||
var Matchers = require('../Matchers');
|
||||
|
||||
|
||||
describe('Modeler', function() {
|
||||
|
||||
var bpmnModel = BpmnModel.instance();
|
||||
|
||||
function read(xml, opts, callback) {
|
||||
return BpmnModel.fromXML(xml, 'bpmn:Definitions', opts, callback);
|
||||
}
|
||||
|
||||
beforeEach(Matchers.add);
|
||||
|
||||
var container;
|
||||
|
||||
|
||||
beforeEach(Matchers.add);
|
||||
|
||||
beforeEach(function() {
|
||||
container = document.createElement('div');
|
||||
document.getElementsByTagName('body')[0].appendChild(container);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
container.parentNode.removeChild(container);
|
||||
});
|
||||
|
||||
|
||||
it('should import simple process', function(done) {
|
||||
|
||||
|
|
|
@ -1,33 +1,21 @@
|
|||
var fs = require('fs');
|
||||
|
||||
var BpmnModel = require('bpmn-moddle'),
|
||||
Viewer = require('../../../lib/Viewer');
|
||||
var Viewer = require('../../../lib/Viewer');
|
||||
|
||||
var Matchers = require('../Matchers');
|
||||
|
||||
|
||||
describe('Viewer', function() {
|
||||
|
||||
var bpmnModel = BpmnModel.instance();
|
||||
|
||||
function read(xml, opts, callback) {
|
||||
return BpmnModel.fromXML(xml, 'bpmn:Definitions', opts, callback);
|
||||
}
|
||||
|
||||
beforeEach(Matchers.add);
|
||||
|
||||
var container;
|
||||
|
||||
|
||||
beforeEach(Matchers.add);
|
||||
|
||||
beforeEach(function() {
|
||||
container = document.createElement('div');
|
||||
document.getElementsByTagName('body')[0].appendChild(container);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
container.parentNode.removeChild(container);
|
||||
});
|
||||
|
||||
|
||||
it('should import simple process', function(done) {
|
||||
|
||||
|
|
|
@ -29,10 +29,6 @@ describe('import/Importer', function() {
|
|||
document.getElementsByTagName('body')[0].appendChild(container);
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
container.parentNode.removeChild(container);
|
||||
});
|
||||
|
||||
|
||||
function createDiagram() {
|
||||
return new Diagram({
|
||||
|
@ -42,7 +38,7 @@ describe('import/Importer', function() {
|
|||
});
|
||||
}
|
||||
|
||||
it('should fire bpmn.element.add during import', function(done) {
|
||||
it('should fire <bpmn.element.add> during import', function(done) {
|
||||
|
||||
// given
|
||||
var xml = fs.readFileSync('test/fixtures/bpmn/simple.bpmn', 'utf8');
|
||||
|
|
Loading…
Reference in New Issue