You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: tests.rs
    path of file: ./repos/pants/src/rust/engine/async_latch/src
    
    the code of the file until where you have to start completion: // Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).
// Licensed under the Apache License, Version 2.0 (see LICENSE).
use std::time::Duration;

use tokio::time::sleep;

use crate::AsyncLatch;

#[tokio::test]
async fn basic() {
    let latch = AsyncLatch::new();

    let mut join = tokio::spawn({
        let lat
    
async fn basic() {
    let latch = AsyncLatch::new();

    let mut join = tokio::spawn({
        let latch = latch.clone();
        async move { latch.triggered().await }
    });

    // Ensure that `triggered` doesn't return until `trigger` has been called.
    tokio::select! {
      _ = sleep(Duration::from_secs(1)) => {},
      _ = &mut join => { panic!("Background task should have continued to wait.") }
    }
    latch.trigger();
    join.await.unwrap();

    // And that calling `trigger` again is harmless.
    latch.trigger();
}