oxc/crates/oxc_semantic/tests/util/expect.rs
Don Isaac b4b39b8aa6
test(semantic): add scoping test cases (#954)
Add test cases to `oxc_semantic` that check scope flag behavior.

Also contains these tweaks:
- fix: allow disabling `with_module` on `SourceType`
- refactor: move `SymbolTester` to a separate file
- chore: add `Expect` trait & implement it on `SymbolTester`
2023-10-03 18:16:01 +13:00

5 lines
111 B
Rust

pub trait Expect<P, R> {
fn expect<F>(self, expectation: F) -> Self
where
F: FnOnce(P) -> R;
}