async function main()

in test-runtimes/javascript/mongodb.js [22:35]


async function main(args) {
    console.log(args.mongodb_url)
    const client = new MongoClient(args.mongodb_url);
    await client.connect()
    console.log("client.connect() passed")
    const data = client.db().collection("data")
    await data.insertOne({ "hello": "world" })
    let res = []
    await data.find().forEach(x => res.push(x))
    await data.deleteMany({})
    return {
        "body": res
    }
}