fix: use fixed testfiles location

This commit is contained in:
ThetaDev 2023-03-25 23:18:49 +01:00
parent 3a2e4c8abe
commit 7bcff13eb8
20 changed files with 80 additions and 62 deletions

View file

@ -288,11 +288,12 @@ fn get_sts(player_js: &str) -> Result<String> {
#[cfg(test)]
mod tests {
use super::*;
use crate::util::tests::TESTFILES;
use path_macro::path;
use rstest::{fixture, rstest};
static TEST_JS: Lazy<String> = Lazy::new(|| {
let js_path = path!("testfiles" / "deobf" / "dummy_player.js");
let js_path = path!(*TESTFILES / "deobf" / "dummy_player.js");
std::fs::read_to_string(js_path).unwrap()
});