fix(tests,webhooks): fix test assertions and webhook API structure

This commit is contained in:
2025-07-22 20:25:14 +00:00
parent 5977c40e05
commit 036d111fa1
9 changed files with 79 additions and 77 deletions

View File

@@ -36,7 +36,7 @@ tap.test('should test session persistence and restoration', async () => {
// Check if context was saved
const contextExists = await plugins.smartfile.fs.fileExists(contextPath);
expect(contextExists).toBe(true);
expect(contextExists).toEqual(true);
console.log('Session context saved to file');
// Create new instance that should restore session
@@ -49,7 +49,7 @@ tap.test('should test session persistence and restoration', async () => {
await restoredAccount.init();
// Should reuse existing session without creating new one
expect(restoredAccount.userId).toBe(testBunqAccount.userId);
expect(restoredAccount.userId).toEqual(testBunqAccount.userId);
console.log('Session restored from saved context');
await restoredAccount.stop();
@@ -61,7 +61,7 @@ tap.test('should test session expiry and renewal', async () => {
// Check if session is valid
const isValid = session.isSessionValid();
expect(isValid).toBe(true);
expect(isValid).toEqual(true);
console.log('Session is currently valid');
// Test session refresh
@@ -70,7 +70,7 @@ tap.test('should test session expiry and renewal', async () => {
// Ensure session is still valid after refresh
const isStillValid = session.isSessionValid();
expect(isStillValid).toBe(true);
expect(isStillValid).toEqual(true);
});
tap.test('should test concurrent session usage', async () => {
@@ -109,7 +109,7 @@ tap.test('should test session with different device names', async () => {
expect(differentDevice.userId).toBeTypeofNumber();
// Should be same user but potentially different session
expect(differentDevice.userId).toBe(testBunqAccount.userId);
expect(differentDevice.userId).toEqual(testBunqAccount.userId);
console.log('Different device session created for same user');
await differentDevice.stop();