Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onclick: () => Snackbar.show({
/* note the Snackbar component is below the other elements in the app */
title: "Hello"
})
}
})
)
]
),
m(Dialog),
m(Snackbar),
m(Notification)
])
};
m.mount(document.querySelector("#root"), App);
export function _afterEach() {
m.mount(qs('main'), null);
}
afterEach(() => {
jasmine.Ajax.uninstall();
m.mount(root, null);
m.redraw();
expect($('.new-modal-container .reveal')).not.toExist('Did you forget to close the modal before the test?');
});
function mount(scmId, material) {
m.mount(root, {
view() {
return m(EditPluggableSCMMaterialWidget, {
scmId: Stream(scmId),
material,
pluginInfos: Stream(PluginInfos.fromJSON(pluginInfosJSON))
});
}
});
m.redraw();
}
const mount = (resources) => {
m.mount(root, {
view() {
return m(ResourcesListWidget, {
hideDropDown,
dropDownReset,
resourcesFetchError,
'onResourcesUpdate': Stream(),
'resources': Stream(resources)
});
}
});
m.redraw();
};
onBlur,
}),
]),
]),
]),
]),
m(
'footer',
m('small', m('a.this-page', { href }, decodeURIComponent(href))),
),
])
},
}
}
m.mount(document.body, App)
const unmount = () => {
m.mount(root, null);
m.redraw();
};
function render() {
var body = document.getElementsByTagName("body")[0];
Mithril.mount(body, {
view: function() {
return [renderError(), renderNotice(), renderList()];
}
});
checkpoint("after render");
}
function mount(attrs: IDialogAttrs) {
const component = {
view: () => m(Dialog, {
isOpen: true,
...attrs
})
};
m.mount(document.body, component);
}
});
afterEach(() => {
document.body.innerHTML = '';
m.mount(document.body, null);
});