UNPKG

projfs-fuse.one

Version:

FUSE3-compatible API for Windows using ProjFS - provides cross-platform virtual filesystem support

47 lines (35 loc) โ€ข 1.41 kB
#!/usr/bin/env node /** * Test for ProjFS-FUSE.ONE package */ import { createRequire } from 'module'; import path from 'path'; const require = createRequire(import.meta.url); console.log('๐Ÿงช Testing ProjFS-FUSE.ONE Package\n'); try { // Test package loading const { ProjFSFuse, FUSE_ERRORS } = await import('../dist/index.js'); console.log('โœ… Package imported successfully'); console.log('โœ… ProjFSFuse class available'); console.log('โœ… FUSE_ERRORS constants available'); // Test instance creation const mountPoint = 'C:\\TestProjFSFuse'; const operations = { readdir: (path) => { console.log(`๐Ÿ“‚ readdir called: ${path}`); return ['test.txt']; } }; const fuse = new ProjFSFuse(mountPoint, operations); console.log('โœ… ProjFSFuse instance created'); console.log(`โœ… Mount path: ${fuse.getMountPath()}`); console.log(`โœ… Initial mounted state: ${fuse.isMounted()}`); console.log('\n๐ŸŽ‰ All basic tests passed!'); console.log('๐Ÿ“ฆ ProjFS-FUSE.ONE package is ready for use'); } catch (error) { console.error('โŒ Test failed:', error.message); if (error.message.includes('Cannot find module')) { console.log('\n๐Ÿ’ก Run "npm run build" to compile the package first'); } process.exit(1); }