UNPKG

@juzi/wechaty-puppet-whatsapp

Version:
25 lines 798 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const mod_js_1 = require("../src/mod.js"); const tstest_1 = require("tstest"); const memory_card_1 = require("memory-card"); (0, tstest_1.test)('memory test', async (t) => { const memory = new memory_card_1.MemoryCard('test-MC'); const puppet = new mod_js_1.PuppetWhatsapp({ memory, }); puppet.on('scan', () => { void puppet.stop(); }); await puppet.start() .then(() => { t.ok(puppet.memory.payload !== undefined, 'memory is loaded'); t.pass('memory test pass'); return null; }) .catch(async (e) => { await puppet.stop(); t.fail(`cannot start puppet due to ${e}`); }); }); //# sourceMappingURL=memory-card.spec.js.map