import { test } from 'node:test'; import assert from 'node:assert/strict'; import { RoomNotificationMode } from '../../hooks/useRoomsNotificationPreferences'; import { shouldResetMuteOnUnmute } from './muteTimers'; test('resets to Unset when the room is still Mute at expiry', () => { assert.equal(shouldResetMuteOnUnmute(RoomNotificationMode.Mute), true); }); test('does not reset when the user switched to All messages during the mute window', () => { assert.equal(shouldResetMuteOnUnmute(RoomNotificationMode.AllMessages), false); }); test('does not reset when the user switched to Special messages during the mute window', () => { assert.equal(shouldResetMuteOnUnmute(RoomNotificationMode.SpecialMessages), false); }); test('does not reset when the mode is already Unset', () => { assert.equal(shouldResetMuteOnUnmute(RoomNotificationMode.Unset), false); });