oxc/tasks/common/src/lib.rs
Boshen c220730779 feat(coverage): check symbols and scopes after transformation (#4917)
closes https://github.com/oxc-project/oxc/issues/4790

@overlookmotel enjoy ... take a look at the snapshots and probably nothing else.

The snapshots are minimal right now, but it's already showing symbols from import specifiers are not being removed. We can iterate on the snapshot representation to aid debugging later.

I'll extend this to `transformer_conformance` and `oxc-monitor` in an up coming PR.
2024-08-16 07:05:11 +00:00

22 lines
538 B
Rust

#![allow(clippy::print_stdout)]
use std::path::{Path, PathBuf};
mod diff;
mod request;
mod snapshot;
mod test_file;
pub use diff::print_diff_in_terminal;
pub use crate::{request::agent, snapshot::Snapshot, test_file::*};
/// # Panics
/// Invalid Project Root
pub fn project_root() -> PathBuf {
project_root::get_project_root().unwrap()
}
/// Normalizes the path when on Windows to using forward slash delimiters.
pub fn normalize_path<P: AsRef<Path>>(path: P) -> String {
path.as_ref().to_string_lossy().replace('\\', "/")
}