projfs-fuse.one
Version:
FUSE3-compatible API for Windows using ProjFS - provides cross-platform virtual filesystem support
47 lines (35 loc) โข 1.41 kB
JavaScript
/**
* 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);
}