mirror of
https://github.com/DeNNiiInc/Web-Page-Performance-Test.git
synced 2026-04-18 04:05:58 +00:00
Add debug import script
This commit is contained in:
26
debug-import.mjs
Normal file
26
debug-import.mjs
Normal file
@@ -0,0 +1,26 @@
|
||||
(async () => {
|
||||
console.log('Checking chrome-launcher exports...');
|
||||
try {
|
||||
const imported = await import('chrome-launcher');
|
||||
console.log('Import Keys:', Object.keys(imported));
|
||||
|
||||
if (imported.default) {
|
||||
console.log('Default export exists.');
|
||||
console.log('Default keys:', Object.keys(imported.default));
|
||||
if (typeof imported.default.launch === 'function') {
|
||||
console.log('VERDICT: imported.default.launch is a function. (OK for Default Import)');
|
||||
} else {
|
||||
console.log('VERDICT: imported.default.launch is NOT a function.');
|
||||
}
|
||||
} else {
|
||||
console.log('Default export is undefined.');
|
||||
}
|
||||
|
||||
if (typeof imported.launch === 'function') {
|
||||
console.log('VERDICT: imported.launch is a function. (Use Named Import)');
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
console.error('Import failed:', e);
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user