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/swc/crates/swc_ecma_transforms_optimization/src/simplify/expr
    
    the code of the file until where you have to start completion: use swc_common::{chain, Mark, SyntaxContext};
use swc_ecma_transforms_base::{fixer::paren_remover, resolver};
use swc_ecma_transforms_testing::test_transform;
use swc_ecma_utils::ExprCtx;
use swc_ecma_visit::as_folder;

use super::SimplifyExpr;

fn fold(src: &str, expected: &str) {
    test_transform(
        ::swc_ecma_parser::Syntax::default(),
        |_| {
            let unresolved_mark = Mark::new();
            let top_level_mark = Mark::new();

            chain!(
                resolver(unresolved_mark, top_level_mark, false),
                paren_remover(None),
                as_folder(SimplifyExpr {

    
fn test_fold_instance_of() {
    // Non object types are never instances of anything.
    fold("64 instanceof Object", "false");
    fold("64 instanceof Number", "false");
    fold("'' instanceof Object", "false");
    fold("'' instanceof String", "false");
    fold("true instanceof Object", "false");
    fold("true instanceof Boolean", "false");
    fold("!0 instanceof Object", "false");
    fold("!0 instanceof Boolean", "false");
    fold("false instanceof Object", "false");
    fold("null instanceof Object", "false");
    fold("undefined instanceof Object", "false");
    fold("NaN instanceof Object", "false");
    fold("Infinity instanceof Object", "false");

    // Array and object literals are known to be objects.
    fold("[] instanceof Object", "true");
    fold("({}) instanceof Object", "true");

    // These cases is foldable, but no handled currently.
    fold("new Foo() instanceof Object", "new Foo(), true;");

    // These would require type information to fold.
    fold_same("[] instanceof Foo");
    fold_same("({}) instanceof Foo");

    fold("(function() {}) instanceof Object", "true");

    // An unknown value should never be folded.
    fold_same("x instanceof Foo");
    fold_same("x instanceof Object");
}