Skip to content

Commit e6904e9

Browse files
committed
Make linter happy for integration tests
1 parent 0e8a457 commit e6904e9

File tree

6 files changed

+20
-9
lines changed

6 files changed

+20
-9
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ members = [
3131
crate-type = ["cdylib", "rlib", "staticlib"]
3232

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

3636
[profile.release]
3737
lto = "fat"

src/lib.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,6 @@
149149
unused_results,
150150
variant_size_differences
151151
)]
152-
#![cfg_attr(
153-
feature = "mockable",
154-
expect(missing_docs, reason = "for testing only")
155-
)]
156152
// TODO: Needs refactoring.
157153
#![expect(
158154
clippy::module_name_repetitions,
@@ -171,3 +167,9 @@ pub mod peer;
171167
pub mod platform;
172168
pub mod room;
173169
pub mod rpc;
170+
171+
#[cfg(all(test, target_family = "wasm"))]
172+
mod used_in_integration_tests_only {
173+
use instant as _;
174+
use wasm_bindgen_test as _;
175+
}

src/platform/dart/utils/callback.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,11 @@ extern "C" fn callback_finalizer(_: *mut c_void, cb: *mut c_void) {
232232

233233
#[cfg(feature = "mockable")]
234234
pub mod tests {
235-
#![expect(clippy::missing_safety_doc, reason = "only for testing")]
235+
#![expect( // for testing only
236+
clippy::missing_safety_doc,
237+
missing_docs,
238+
reason = "for testing only"
239+
)]
236240

237241
use std::cell::RefCell;
238242

src/platform/dart/utils/dart_future.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,11 @@ where
206206

207207
#[cfg(feature = "mockable")]
208208
pub mod tests {
209-
#![expect(clippy::missing_safety_doc, reason = "for testing only")]
209+
#![expect( // for testing only
210+
clippy::missing_safety_doc,
211+
missing_docs,
212+
reason = "for testing only"
213+
)]
210214

211215
use std::cell::RefCell;
212216

tests/rpc/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,8 +716,8 @@ mod on_connection_loss {
716716
}
717717

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

tests/web.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ async fn wait_and_check_test_result(
332332
};
333333
}
334334

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

0 commit comments

Comments
 (0)