diff --git a/test/spec/ViewerSpec.js b/test/spec/ViewerSpec.js index d1db2d34..c9aa5e4e 100644 --- a/test/spec/ViewerSpec.js +++ b/test/spec/ViewerSpec.js @@ -297,6 +297,36 @@ describe('Viewer', function() { } + it('should export XML', function(done) { + + // given + var xml = require('../fixtures/bpmn/simple.bpmn'); + + createViewer(xml, function(err, warnings, viewer) { + + if (err) { + return done(err); + } + + // when + viewer.saveXML({ format: true }, function(err, xml) { + + if (err) { + return done(err); + } + + // then + expect(xml).to.contain(''); + expect(xml).to.contain('