Skip to content

Commit

Permalink
add test to remove symbol values from objects
Browse files Browse the repository at this point in the history
  • Loading branch information
n14little committed May 18, 2020
1 parent 7653375 commit b22e5b9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions boa/src/builtins/json/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,20 @@ fn json_stringify_remove_function_values_from_objects() {
assert_eq!(actual, expected);
}

#[test]
fn json_stringify_remove_symbols_from_objects() {
let realm = Realm::create();
let mut engine = Executor::new(realm);

let actual = forward(
&mut engine,
r#"JSON.stringify({ aaa: Symbol(), bbb: 'ccc' })"#,
);
let expected = r#"{"bbb":"ccc"}"#;

assert_eq!(actual, expected);
}

#[test]
fn json_stringify_replacer_array_strings() {
let realm = Realm::create();
Expand Down

0 comments on commit b22e5b9

Please sign in to comment.