Skip to content

Commit

Permalink
Make linter happy for integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tyranron committed Jan 15, 2025
1 parent 0e8a457 commit e6904e9
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ members = [
crate-type = ["cdylib", "rlib", "staticlib"]

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(frb_expand)"] }
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(disabled)", "cfg(frb_expand)"] }

[profile.release]
lto = "fat"
Expand Down
10 changes: 6 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,6 @@
unused_results,
variant_size_differences
)]
#![cfg_attr(
feature = "mockable",
expect(missing_docs, reason = "for testing only")
)]
// TODO: Needs refactoring.
#![expect(
clippy::module_name_repetitions,
Expand All @@ -171,3 +167,9 @@ pub mod peer;
pub mod platform;
pub mod room;
pub mod rpc;

#[cfg(all(test, target_family = "wasm"))]
mod used_in_integration_tests_only {
use instant as _;
use wasm_bindgen_test as _;
}
6 changes: 5 additions & 1 deletion src/platform/dart/utils/callback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,11 @@ extern "C" fn callback_finalizer(_: *mut c_void, cb: *mut c_void) {

#[cfg(feature = "mockable")]
pub mod tests {
#![expect(clippy::missing_safety_doc, reason = "only for testing")]
#![expect( // for testing only
clippy::missing_safety_doc,
missing_docs,
reason = "for testing only"
)]

use std::cell::RefCell;

Expand Down
6 changes: 5 additions & 1 deletion src/platform/dart/utils/dart_future.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,11 @@ where

#[cfg(feature = "mockable")]
pub mod tests {
#![expect(clippy::missing_safety_doc, reason = "for testing only")]
#![expect( // for testing only
clippy::missing_safety_doc,
missing_docs,
reason = "for testing only"
)]

use std::cell::RefCell;

Expand Down
4 changes: 2 additions & 2 deletions tests/rpc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -716,8 +716,8 @@ mod on_connection_loss {
}

/// Tests for the [`RpcClient::on_reconnected`] function.
// TODO: this tests should be implemented for the RpcSession!
#[cfg(feature = "disabled")]
// TODO: This tests should be implemented for the `RpcSession`!
#[cfg(disabled)]
mod on_reconnected {
use medea_reactive::ObservableCell;

Expand Down
1 change: 1 addition & 0 deletions tests/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ async fn wait_and_check_test_result(
};
}

#[expect(dead_code, reason = "preserved for future tests")]
async fn get_video_track() -> api::RemoteMediaTrack {
let manager = MediaManager::default();
let mut settings = MediaStreamSettings::new();
Expand Down

0 comments on commit e6904e9

Please sign in to comment.