mirror of
https://github.com/sern-handler/handler
synced 2026-06-28 02:32:15 +00:00
step 1
This commit is contained in:
@@ -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")
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user