test(Viewer): move missing diagram spec

This commit is contained in:
Nico Rehwaldt 2020-02-10 19:33:50 +01:00
parent f5861dfade
commit 98bc96caac
1 changed files with 15 additions and 19 deletions

View File

@ -267,6 +267,21 @@ describe('Viewer', function() {
});
});
it('should throw error due to missing diagram', function(done) {
var xml = require('../fixtures/bpmn/empty-definitions.bpmn');
// when
createViewer(xml, function(err, warnings) {
// then
expect(err.message).to.eql('no diagram to display');
done();
});
});
});
@ -549,25 +564,6 @@ describe('Viewer', function() {
});
it('should throw error due to missing diagram', function(done) {
var xml = require('../fixtures/bpmn/empty-definitions.bpmn');
// given
viewer = new Viewer({ container: container, additionalModules: testModules });
// when
viewer.importXML(xml, function(err) {
// then
expect(err.message).to.eql('no diagram to display');
done();
});
});
});