"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("../../src/utils");
async function testConcurrentAsks() {
    console.log("Testing concurrent ask() calls...\n");
    console.log("This test asks two questions before you can answer.");
    console.log("You should only see the second question and typing should not duplicate.\n");
    const promise1 = (0, utils_1.ask)("Question 1: What is your name? ");
    await new Promise(resolve => setTimeout(resolve, 100));
    const promise2 = (0, utils_1.ask)("Question 2: What is your age? ");
    const [answer1, answer2] = await Promise.all([promise1, promise2]);
    console.log("\nResults:");
    console.log("Answer to question 1:", answer1);
    console.log("Answer to question 2:", answer2);
    console.log("\nBoth questions should have received the same answer.");
    process.exit(0);
}
testConcurrentAsks().catch(error => {
    console.error("Error:", error);
    process.exit(1);
});
//# sourceMappingURL=test-concurrent-ask.js.map