Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
beforeEach(function() {
// Make sure the test container is an optional dependency and we fall back
// to an empty <div> if it does not exist.
//
// This is needed if other libraries rely on this helper for testing
// while not adding the mocha-test-container-support as a dependency.
try {
testContainer = TestContainer.get(this);
} catch (e) {
testContainer = document.createElement('div');
document.body.appendChild(testContainer);
}
testContainer.classList.add('test-container');
});
</div>
return function(done) {
var testContainer;
// Make sure the test container is an optional dependency and we fall back
// to an empty <div> if it does not exist.
//
// This is needed if other libraries rely on this helper for testing
// while not adding the mocha-test-container-support as a dependency.
try {
// 'this' is the current test context
testContainer = TestContainer.get(this);
} catch (e) {
testContainer = document.createElement('div');
document.body.appendChild(testContainer);
}
testContainer.classList.add('test-container');
var _options = options,
_locals = locals;
if (_locals === undefined && isFunction(_options)) {
_locals = _options;
_options = null;
}
if (isFunction(_options)) {</div>
return function(done) {
var testContainer;
// Make sure the test container is an optional dependency and we fall back
// to an empty <div> if it does not exist.
//
// This is needed if other libraries rely on this helper for testing
// while not adding the mocha-test-container-support as a dependency.
try {
// 'this' is the current test context
testContainer = TestContainer.get(this);
} catch (e) {
testContainer = document.createElement('div');
document.body.appendChild(testContainer);
}
testContainer.classList.add('test-container');
var _options = options,
_locals = locals;
if (_locals === undefined && isFunction(_options)) {
_locals = _options;
_options = null;
}
if (isFunction(_options)) {</div>
return function() {
var testContainer;
// Make sure the test container is an optional dependency and we fall back
// to an empty <div> if it does not exist.
//
// This is needed if other libraries rely on this helper for testing
// while not adding the mocha-test-container-support as a dependency.
try {
testContainer = TestContainer.get(this);
} catch (e) {
testContainer = document.createElement('div');
document.body.appendChild(testContainer);
}
testContainer.classList.add('test-container');
var _options = options,
_locals = locals;
if (!_locals && isFunction(_options)) {
_locals = _options;
_options = null;
}
</div>
beforeEach(function() {
container = TestContainer.get(this);
modeler = new Modeler({ container: container });
});
beforeEach(function() {
container = TestContainer.get(this);
});
beforeEach(function() {
container = TestContainer.get(this);
});
beforeEach(function() {
container = TestContainer.get(this);
});
beforeEach(function() {
container = TestContainer.get(this);
});
beforeEach(function() {
var testContainer = TestContainer.get(this);
var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
svg.setAttribute('width', '100%');
svg.setAttribute('height', '100%');
testContainer.appendChild(svg);
paper = new Snap(svg);
});