diff --git a/__tests__/__main__/time-math.js b/__tests__/__main__/time-math.js index f5407c57..c4c79f4e 100644 --- a/__tests__/__main__/time-math.js +++ b/__tests__/__main__/time-math.js @@ -38,7 +38,7 @@ describe('Time Math Functions', () => { it('date1 Should not be negative', () => { - expect(isNegative(date2)).not.toBeTruthy(); + assert.strictEqual(isNegative(date2), false); }); it('-date2 Should be negative', () => @@ -165,12 +165,12 @@ describe('Time Math Functions', () => assert.strictEqual(validateTime('11:11'), true); assert.strictEqual(validateTime('23:59'), true); assert.strictEqual(validateTime('-04:00'), true); - expect(validateTime('24:00')).not.toBeTruthy(); - expect(validateTime('34:00')).not.toBeTruthy(); - expect(validateTime('4:00')).not.toBeTruthy(); - expect(validateTime('00:1')).not.toBeTruthy(); - expect(validateTime('--:--')).not.toBeTruthy(); - expect(validateTime('')).not.toBeTruthy(); + assert.strictEqual(validateTime('24:00'), false); + assert.strictEqual(validateTime('34:00'), false); + assert.strictEqual(validateTime('4:00'), false); + assert.strictEqual(validateTime('00:1'), false); + assert.strictEqual(validateTime('--:--'), false); + assert.strictEqual(validateTime(''), false); }); it('validateDate(date)', () => diff --git a/__tests__/__main__/user-preferences.js b/__tests__/__main__/user-preferences.js index 934f0424..d9c38f09 100644 --- a/__tests__/__main__/user-preferences.js +++ b/__tests__/__main__/user-preferences.js @@ -466,7 +466,7 @@ describe('Preferences Main', () => lastLanguage = language; } }); - expect(lastLanguage).not.toBe(''); + assert.notStrictEqual(lastLanguage, ''); }); diff --git a/__tests__/__main__/windows.js b/__tests__/__main__/windows.js index 8950ab94..003ff4b2 100644 --- a/__tests__/__main__/windows.js +++ b/__tests__/__main__/windows.js @@ -31,7 +31,7 @@ describe('windows.js', () => show: false }); openWaiverManagerWindow(mainWindow); - expect(getWaiverWindow()).not.toBe(null); + assert.notStrictEqual(getWaiverWindow(), null); assert.strictEqual(getWaiverWindow() instanceof BrowserWindow, true); expect(getWaiverWindow().getSize()).toEqual([600, 500]); done(); @@ -44,7 +44,7 @@ describe('windows.js', () => }); openWaiverManagerWindow(mainWindow); openWaiverManagerWindow(mainWindow); - expect(getWaiverWindow()).not.toBe(null); + assert.notStrictEqual(getWaiverWindow(), null); // It should only load once the URL because it already exists expect(showSpy).toHaveBeenCalledTimes(2); expect(loadSpy).toHaveBeenCalledTimes(1); @@ -57,7 +57,7 @@ describe('windows.js', () => show: false }); openWaiverManagerWindow(mainWindow, true); - expect(getWaiverWindow()).not.toBe(null); + assert.notStrictEqual(getWaiverWindow(), null); assert.strictEqual(global.waiverDay, getDateStr(new Date())); done(); }); diff --git a/__tests__/__renderer__/classes/FlexibleDayCalendar.js b/__tests__/__renderer__/classes/FlexibleDayCalendar.js index 2107edc8..f3f9adee 100644 --- a/__tests__/__renderer__/classes/FlexibleDayCalendar.js +++ b/__tests__/__renderer__/classes/FlexibleDayCalendar.js @@ -218,14 +218,14 @@ describe('FlexibleDayCalendar class Tests', () => calendar._nextDay(); assert.strictEqual(calendar._getCalendarDate(), expectedNextDay.getDate()); assert.strictEqual(calendar._isCalendarOnDate(expectedNextDay), true); - expect(calendar._isCalendarOnDate(expectedPrevDay)).not.toBeTruthy(); + assert.strictEqual(calendar._isCalendarOnDate(expectedPrevDay), false); calendar._prevDay(); assert.strictEqual(calendar._getCalendarDate(), today.getDate()); calendar._prevDay(); assert.strictEqual(calendar._getCalendarDate(), expectedPrevDay.getDate()); - expect(calendar._isCalendarOnDate(expectedNextDay)).not.toBeTruthy(); + assert.strictEqual(calendar._isCalendarOnDate(expectedNextDay), false); assert.strictEqual(calendar._isCalendarOnDate(expectedPrevDay), true); calendar._goToCurrentDate(); @@ -329,7 +329,7 @@ describe('FlexibleDayCalendar class Tests', () => // Refreshing with a date not being looked at should not push it to today calendar.refreshOnDayChange(today.getDate(), today.getMonth(), today.getFullYear()); - expect(calendar._getCalendarDate()).not.toBe(today.getDate()); + assert.notStrictEqual(calendar._getCalendarDate(), today.getDate()); }); }); diff --git a/__tests__/__renderer__/classes/FlexibleMonthCalendar.js b/__tests__/__renderer__/classes/FlexibleMonthCalendar.js index 8bf31a74..88320332 100644 --- a/__tests__/__renderer__/classes/FlexibleMonthCalendar.js +++ b/__tests__/__renderer__/classes/FlexibleMonthCalendar.js @@ -228,7 +228,7 @@ describe('FlexibleMonthCalendar class Tests', () => // Refreshing with a date not being looked at should not push it to today calendar.refreshOnDayChange(today.getDate(), today.getMonth(), today.getFullYear()); - expect(calendar._getCalendarMonth()).not.toBe(today.getMonth()); + assert.notStrictEqual(calendar._getCalendarMonth(), today.getMonth()); }); }); diff --git a/__tests__/__renderer__/preferences.js b/__tests__/__renderer__/preferences.js index 97482950..88ce992c 100644 --- a/__tests__/__renderer__/preferences.js +++ b/__tests__/__renderer__/preferences.js @@ -211,7 +211,7 @@ describe('Test Preferences Window', () => lastValue = this.value; } }); - expect(lastValue).not.toBe(''); + assert.notStrictEqual(lastValue, ''); }); }); }); diff --git a/__tests__/__renderer__/themes.js b/__tests__/__renderer__/themes.js index c94ddc71..a909c722 100644 --- a/__tests__/__renderer__/themes.js +++ b/__tests__/__renderer__/themes.js @@ -24,8 +24,8 @@ describe('Theme Functions', function() { it('should not validate', () => { - expect(isValidTheme('foo')).not.toBeTruthy(); - expect(isValidTheme('bar')).not.toBeTruthy(); + assert.strictEqual(isValidTheme('foo'), false); + assert.strictEqual(isValidTheme('bar'), false); }); }); @@ -41,8 +41,8 @@ describe('Theme Functions', function() it('should not apply', function() { - expect(applyTheme('foo')).not.toBeTruthy(); - expect(applyTheme('bar')).not.toBeTruthy(); + assert.strictEqual(applyTheme('foo'), false); + assert.strictEqual(applyTheme('bar'), false); }); }); }); diff --git a/__tests__/__renderer__/user-preferences.js b/__tests__/__renderer__/user-preferences.js index 62bc65fa..7b64f72b 100644 --- a/__tests__/__renderer__/user-preferences.js +++ b/__tests__/__renderer__/user-preferences.js @@ -30,24 +30,24 @@ describe('Should return true if the value is a valid notification interval', () assert.strictEqual(isNotificationInterval(1), true); assert.strictEqual(isNotificationInterval(15), true); assert.strictEqual(isNotificationInterval(30), true); - expect(isNotificationInterval(-5)).not.toBe(true); - expect(isNotificationInterval(0)).not.toBe(true); - expect(isNotificationInterval(31)).not.toBe(true); - expect(isNotificationInterval(60)).not.toBe(true); + assert.notStrictEqual(isNotificationInterval(-5), true); + assert.notStrictEqual(isNotificationInterval(0), true); + assert.notStrictEqual(isNotificationInterval(31), true); + assert.notStrictEqual(isNotificationInterval(60), true); }); it('Value as string (val >= 1 || val <= 30)', () => { assert.strictEqual(isNotificationInterval('1'), true); assert.strictEqual(isNotificationInterval('30'), true); - expect(isNotificationInterval('-5')).not.toBe(true); - expect(isNotificationInterval('31')).not.toBe(true); - expect(isNotificationInterval('A')).not.toBe(true); - expect(isNotificationInterval('abc')).not.toBe(true); + assert.notStrictEqual(isNotificationInterval('-5'), true); + assert.notStrictEqual(isNotificationInterval('31'), true); + assert.notStrictEqual(isNotificationInterval('A'), true); + assert.notStrictEqual(isNotificationInterval('abc'), true); }); it('Value as boolean type', () => { - expect(isNotificationInterval(true)).not.toBe(true); - expect(isNotificationInterval(false)).not.toBe(true); + assert.notStrictEqual(isNotificationInterval(true), true); + assert.notStrictEqual(isNotificationInterval(false), true); }); }); diff --git a/__tests__/__renderer__/window-aux.js b/__tests__/__renderer__/window-aux.js index c0e0952d..618217e2 100644 --- a/__tests__/__renderer__/window-aux.js +++ b/__tests__/__renderer__/window-aux.js @@ -32,7 +32,7 @@ describe('window-aux.cjs Testing', function() // { // const testWindow = new BrowserWindow(browserWindowOptions); // testWindow.loadURL(mockHtmlPath); - // expect(testWindow.webContents.isDevToolsOpened()).not.toBeTruthy(); + // assert.strictEqual(testWindow.webContents.isDevToolsOpened(), false); // testWindow.webContents.on('dom-ready', () => // { @@ -44,14 +44,14 @@ describe('window-aux.cjs Testing', function() // }); // await new Promise(r => setTimeout(r, timeoutValue)); - // expect(testWindow.webContents.isDevToolsOpened()).not.toBeTruthy(); + // assert.strictEqual(testWindow.webContents.isDevToolsOpened(), false); // }); // it('Bind: should open devTools', async() => // { // const testWindow = new BrowserWindow(browserWindowOptions); // testWindow.loadURL(mockHtmlPath); - // expect(testWindow.webContents.isDevToolsOpened()).not.toBeTruthy(); + // assert.strictEqual(testWindow.webContents.isDevToolsOpened(), false); // testWindow.webContents.on('dom-ready', () => // { @@ -71,7 +71,7 @@ describe('window-aux.cjs Testing', function() // { // const testWindow = new BrowserWindow(browserWindowOptions); // testWindow.loadURL(mockHtmlPath); - // expect(testWindow.webContents.isDevToolsOpened()).not.toBeTruthy(); + // assert.strictEqual(testWindow.webContents.isDevToolsOpened(), false); // testWindow.webContents.on('dom-ready', () => // { @@ -84,7 +84,7 @@ describe('window-aux.cjs Testing', function() // }); // await new Promise(r => setTimeout(r, timeoutValue)); - // expect(testWindow.webContents.isDevToolsOpened()).not.toBeTruthy(); + // assert.strictEqual(testWindow.webContents.isDevToolsOpened(), false); // }); // });