Chat-only commands reset voicemail mailbox and voice portal passcodes via telephony_config_write, with extension lookup and unit tests. Co-authored-by: Cursor <cursoragent@cursor.com>
18 lines
631 B
JavaScript
18 lines
631 B
JavaScript
// tests/resetVpPin.parse.test.js
|
|
|
|
import test from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
|
|
import { parseVpPinStore } from '../services/voicePin/parseVpPinStore.js';
|
|
|
|
test('parseVpPinStore recognizes store numbers', () => {
|
|
assert.deepEqual(parseVpPinStore('782'), { storeNum: '782' });
|
|
assert.deepEqual(parseVpPinStore('24'), { storeNum: '24' });
|
|
});
|
|
|
|
test('parseVpPinStore rejects non-store tokens', () => {
|
|
assert.equal(parseVpPinStore(''), null);
|
|
assert.equal(parseVpPinStore('12345'), null);
|
|
assert.equal(parseVpPinStore('mcqueenj@ae.com'), null);
|
|
assert.equal(parseVpPinStore('50782'), null);
|
|
});
|