Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
destroy: function () {
// setup
dd = new SimpleDropDownButton({id: "dd2"}).placeAt(container);
popup = dd.dropDown;
assert.ok(!!popup, "popup exists");
// open
click(dd);
assert.ok(helpers.isVisible(popup), "popup visible");
assert.strictEqual(1, require("delite/popup")._stack.length, "in popup manager stack");
// destroy
dd.destroy();
assert.strictEqual(0, require("delite/popup")._stack.length, "popup was closed");
},