explainer 0.1.3

Explain a given word, including its pronunciation, meanings, and sample sentences.
Documentation
use explainer::{Explainer, Jsonify};

#[tokio::test]
async fn should_get_instance() {
    let word = "extremely";
    let result = Explainer::from(word).await;

    assert!(result.is_ok())
}

#[tokio::test]
async fn canbe_serialized_to_json() {
    let word = "extremely";
    let explainer = Explainer::from(word).await.unwrap();

    assert!(
        explainer.pronunciation.to_json().is_ok()
            && explainer.meanings.to_json().is_ok()
            && explainer.sentences.to_json().is_ok()
            && explainer.to_json().is_ok()
    )
}

#[tokio::test]
#[should_panic]
async fn cannot_get_results() {
    let word = "abcijkdefguvwzyxrst";
    let result = Explainer::from(word).await;

    assert!(
        result.is_ok(),
        "No results found, ensure the word `{word}` spelled correctly.
"
    )
}