Skip to content

How to test a visitor that uses visit_mut_script #8712

Answered by lubieowoce
leafypout asked this question in Q&A
Discussion options

You must be logged in to vote

For anyone else stumbling upon this, test_transform takes an is_module argument now:

pub fn test_transform<F, P>(
    syntax: Syntax,
    is_module: Option<bool>,
    tr: F,
    input: &str,
    expected: &str,
)
where
    F: FnOnce(&mut Tester<'_>) -> P,
    P: Pass,

https://rustdoc.swc.rs/swc_ecma_transforms_testing/fn.test_transform.html

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@leafypout
Comment options

@leafypout
Comment options

Answer selected by leafypout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants