Added logger and tests

This commit is contained in:
Emil
2026-02-24 10:02:13 +01:00
parent cfc4cb6849
commit 9b92883d30
16 changed files with 104 additions and 44 deletions
@@ -59,9 +59,9 @@ describe('createExtensionContext', () => {
ctx.log.warn('caution')
ctx.log.error('oops')
expect(logSpy).toHaveBeenCalledWith('[my-ext]', 'hello', 42)
expect(warnSpy).toHaveBeenCalledWith('[my-ext]', 'caution')
expect(errorSpy).toHaveBeenCalledWith('[my-ext]', 'oops')
expect(logSpy).toHaveBeenCalledWith('[ext:my-ext]', 'hello', 42)
expect(warnSpy).toHaveBeenCalledWith('[ext:my-ext]', 'caution')
expect(errorSpy).toHaveBeenCalledWith('[ext:my-ext]', 'oops')
logSpy.mockRestore()
warnSpy.mockRestore()