This commit is contained in:
jacob
2024-04-28 13:48:50 -05:00
parent 91b3768e37
commit 30230d49c3
6 changed files with 35 additions and 28 deletions

View File

@@ -8,15 +8,13 @@ describe('module-loading', () => {
const filename = Files.fmtFileName(name+'.'+extension);
expect(filename).toBe(name)
})
// todo: handle commands with multiple extensions
// it('should properly extract filename from file, nested multiple', () => {
// const extension = faker.system.fileExt()
// const extension2 = faker.system.fileExt()
// const name = faker.system.fileName({ extensionCount: 0 })
// const filename = Files.fmtFileName(name+'.'+extension+'.'+extension2);
// console.log(filename, name)
// expect(filename).toBe(name)
//
// })
it('should get the filename of the commandmodule (linux)', () => {
const fname = "///home/pooba/Projects/sern/halibu/dist/commands/ping.js"
expect(Files.parseCallsite(fname)).toBe("ping")
})
it('should get the filename of the commandmodule (windows)', () => {
//const fname = "C:\\pooba\\Projects\\sern\\halibu\\dist\\commands\\ping.js"
//expect(Files.parseCallsite(fname)).toBe("ping")
})
})