mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-03-05 13:30:32 -05:00
test: import privatebin.js
This commit is contained in:
10
js/common.js
10
js/common.js
@@ -24,6 +24,16 @@ global.cleanup = function () {
|
||||
}
|
||||
global.$ = global.jQuery = require('./jquery-3.7.1');
|
||||
|
||||
// reload the core library to capture the new window/document in any
|
||||
// closures (TopNav, PasteViewer, etc). This also refreshes event bindings
|
||||
// and cached element lookups.
|
||||
try {
|
||||
delete require.cache[require.resolve('./privatebin')];
|
||||
} catch (e) {
|
||||
// ignore
|
||||
}
|
||||
require('./privatebin');
|
||||
|
||||
// also re-export the PrivateBin namespace if available
|
||||
if (typeof window !== 'undefined' && window.PrivateBin) {
|
||||
global.PrivateBin = window.PrivateBin;
|
||||
|
||||
Reference in New Issue
Block a user