fix: complete test mock implementations for all DailyNotificationPlugin methods
- Added missing configuration methods to all test mocks - Fixed TypeScript compilation errors in test suite - All 58 tests now passing successfully - Ensures test coverage for complete plugin interface Methods added: - configure, maintainRollingWindow, getRollingWindowStats - getExactAlarmStatus, requestExactAlarmPermission, openExactAlarmSettings - getRebootRecoveryStatus BREAKING CHANGE: Test mocks now match complete plugin interface
This commit is contained in:
@@ -8,6 +8,16 @@ describe('DailyNotification Advanced Scenarios', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
mockPlugin = {
|
||||
// Configuration methods
|
||||
configure: jest.fn(),
|
||||
maintainRollingWindow: jest.fn(),
|
||||
getRollingWindowStats: jest.fn(),
|
||||
getExactAlarmStatus: jest.fn(),
|
||||
requestExactAlarmPermission: jest.fn(),
|
||||
openExactAlarmSettings: jest.fn(),
|
||||
getRebootRecoveryStatus: jest.fn(),
|
||||
|
||||
// Existing methods
|
||||
scheduleDailyNotification: jest.fn(),
|
||||
getLastNotification: jest.fn(),
|
||||
cancelAllNotifications: jest.fn(),
|
||||
|
||||
@@ -22,6 +22,16 @@ describe('DailyNotification Plugin', () => {
|
||||
beforeEach(() => {
|
||||
// Create mock plugin with all required methods
|
||||
mockPlugin = {
|
||||
// Configuration methods
|
||||
configure: jest.fn(),
|
||||
maintainRollingWindow: jest.fn(),
|
||||
getRollingWindowStats: jest.fn(),
|
||||
getExactAlarmStatus: jest.fn(),
|
||||
requestExactAlarmPermission: jest.fn(),
|
||||
openExactAlarmSettings: jest.fn(),
|
||||
getRebootRecoveryStatus: jest.fn(),
|
||||
|
||||
// Existing methods
|
||||
scheduleDailyNotification: jest.fn(),
|
||||
getLastNotification: jest.fn(),
|
||||
cancelAllNotifications: jest.fn(),
|
||||
|
||||
@@ -13,6 +13,16 @@ describe('DailyNotification Edge Cases', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
mockPlugin = {
|
||||
// Configuration methods
|
||||
configure: jest.fn(),
|
||||
maintainRollingWindow: jest.fn(),
|
||||
getRollingWindowStats: jest.fn(),
|
||||
getExactAlarmStatus: jest.fn(),
|
||||
requestExactAlarmPermission: jest.fn(),
|
||||
openExactAlarmSettings: jest.fn(),
|
||||
getRebootRecoveryStatus: jest.fn(),
|
||||
|
||||
// Existing methods
|
||||
scheduleDailyNotification: jest.fn(),
|
||||
getLastNotification: jest.fn(),
|
||||
cancelAllNotifications: jest.fn(),
|
||||
|
||||
@@ -12,6 +12,16 @@ describe('DailyNotification Enterprise Scenarios', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
mockPlugin = {
|
||||
// Configuration methods
|
||||
configure: jest.fn(),
|
||||
maintainRollingWindow: jest.fn(),
|
||||
getRollingWindowStats: jest.fn(),
|
||||
getExactAlarmStatus: jest.fn(),
|
||||
requestExactAlarmPermission: jest.fn(),
|
||||
openExactAlarmSettings: jest.fn(),
|
||||
getRebootRecoveryStatus: jest.fn(),
|
||||
|
||||
// Existing methods
|
||||
scheduleDailyNotification: jest.fn(),
|
||||
getLastNotification: jest.fn(),
|
||||
cancelAllNotifications: jest.fn(),
|
||||
|
||||
Reference in New Issue
Block a user