use javascript::*;
#[test]
fn test_number_less_than_number() {
let script = "1 < 2";
let result = evaluate_script(script, false, None::<&std::path::Path>).unwrap();
assert_eq!(result, "true");
}
#[test]
fn test_string_less_than_string() {
let script = "'a' < 'b'";
let result = evaluate_script(script, false, None::<&std::path::Path>).unwrap();
assert_eq!(result, "true");
}
#[test]
fn test_string_number_coercion() {
let script = "'2' < 3";
let result = evaluate_script(script, false, None::<&std::path::Path>).unwrap();
assert_eq!(result, "true");
}
#[test]
fn test_boolean_number_comparison() {
let script = "true < 2";
let result = evaluate_script(script, false, None::<&std::path::Path>).unwrap();
assert_eq!(result, "true");
}
#[test]
fn test_undefined_comparison_is_false() {
let script = "undefined < 1";
let result = evaluate_script(script, false, None::<&std::path::Path>).unwrap();
assert_eq!(result, "false");
}
#[test]
fn test_bigint_comparison() {
let script = "0n < 1n";
let result = evaluate_script(script, false, None::<&std::path::Path>).unwrap();
assert_eq!(result, "true");
}