Keep Studio business branding in verified client storage

This commit is contained in:
khondokartowsif171
2026-10-19 11:54:13 +06:00
parent 165320cc9f
commit 54091f4578
11 changed files with 151 additions and 38 deletions
+9 -1
View File
@@ -4,7 +4,15 @@ const fs = require('node:fs');
const vm = require('node:vm');
const path = require('node:path');
const workspaceModule = fs.existsSync(path.join(__dirname, '../workspace.js')) ? '../workspace.js' : '../public/workspace.js';
const { scopedStorage, escapeText } = require(workspaceModule);
const { scopedStorage, escapeText, whatsappUrl } = require(workspaceModule);
test('WhatsApp links preserve explicit international country codes without a Bangladesh prefix', () => {
assert.equal(whatsappUrl('+880 1712-426871'), 'https://wa.me/8801712426871');
assert.equal(whatsappUrl('+44 20 7946 0958'), 'https://wa.me/442079460958');
assert.equal(whatsappUrl('01712426871'), '');
assert.equal(whatsappUrl(''), '');
assert.equal(whatsappUrl('javascript:alert(1)'), '');
});
const a = '11111111-1111-4111-8111-111111111111';
const b = '22222222-2222-4222-8222-222222222222';
function memory() {