@juzi/wechaty-puppet-whatsapp
Version:
Wechaty Puppet for WhatsApp
25 lines • 945 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tstest_1 = require("tstest");
const puppet_whatsapp_js_1 = require("./puppet-whatsapp.js");
class PuppetWhatsAppTest extends puppet_whatsapp_js_1.PuppetWhatsapp {
}
(0, tstest_1.test)('PuppetWhatsapp perfect restart testing', async (t) => {
const puppet = new PuppetWhatsAppTest();
try {
for (let i = 0; i < 3; i++) {
await puppet.start();
t.ok(puppet.state.active(), 'should be turned active after start()');
await puppet.stop();
t.ok(puppet.state.inactive(), 'should be turned inactive after stop()');
t.pass('start/stop-ed at #' + i);
}
t.pass('PuppetWhatsapp() perfect restart pass.');
}
catch (e) {
console.error(e);
t.fail(e);
}
});
//# sourceMappingURL=puppet-whatsapp.spec.js.map