12 lines
532 B
TypeScript
12 lines
532 B
TypeScript
import { test } from 'node:test';
|
|||
|
|
import assert from 'node:assert/strict';
|
||
|
|
import { BUSY_PRESENCE, isDndPresence } from './busyPresence';
|
||
|
|
|
||
|
|
test('isDndPresence: busy, or the legacy unavailable + "dnd" text (#283)', () => {
|
||
|
|
assert.equal(isDndPresence(BUSY_PRESENCE, '🎮 Gaming'), true);
|
||
|
|
assert.equal(isDndPresence(BUSY_PRESENCE, undefined), true);
|
||
|
|
assert.equal(isDndPresence('unavailable', 'dnd'), true);
|
||
|
|
assert.equal(isDndPresence('unavailable', 'lunch'), false);
|
||
|
|
assert.equal(isDndPresence('online', 'dnd'), false);
|
||
|
|
});
|