0👍
Consider onbeforeunload
which throws an error and prevents an actual page reloading, and assert.throws
catching the error. Something like this:
describe("#location.reload", () => {
it("works well", () => {
window.onbeforeunload = () => {
throw new Error();
};
assert.throws(location.reload);
});
});
- [Vuejs]-Removing firestore from Vue project but retaining firebase auth
- [Vuejs]-Vue class equivalent for setup(){const { t } = useI18n({ inheritLocale: true, useScope: 'local' })}
Source:stackexchange.com