Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,3 @@ changes unless they are inseparable.
- Integration tests stay in the crate's `tests/` directory.
- OpenHuman's `scripts/externalize-inline-tests.mjs <repo-root> --write` moves
inline test modules out mechanically; without `--write` it only reports.
- Existing `test.rs` and `<module>_test.rs` files predate this rule. Rename each
to `<module>_tests.rs` (keep its `mod` name, add the `#[path]` attribute) the
next time you touch it.
1 change: 1 addition & 0 deletions crates/tinychannels-bus/src/adapters/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ pub mod local;
pub use local::{LocalChannelAdapter, LocalOutboundSink};

#[cfg(test)]
#[path = "mod_tests.rs"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add the required parent import to migrated test files

When externalizing these suites, this file—and the migrated src/delivery/mod_tests.rs, src/harness/mod_tests.rs, and src/relay/mod_tests.rs files—omits use super::*; entirely and instead imports the module API through crate paths. The repository explicitly requires sibling unit-test files to start with the parent glob import, so normalize these migrated files as part of the rename.

AGENTS.md reference: AGENTS.md:L140-L142

Useful? React with 👍 / 👎.

mod test;
1 change: 1 addition & 0 deletions crates/tinychannels-bus/src/channel/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ pub use types::{
};

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
2 changes: 1 addition & 1 deletion crates/tinychannels-bus/src/delivery/segment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,5 +240,5 @@ pub fn segment_delay(segment: &str) -> u64 {
}

#[cfg(test)]
#[path = "segment_test.rs"]
#[path = "segment_tests.rs"]
mod tests;
1 change: 1 addition & 0 deletions crates/tinychannels-bus/src/security/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,4 +288,5 @@ pub fn constant_time_eq(a: &str, b: &str) -> bool {
}

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
2 changes: 1 addition & 1 deletion crates/tinychannels-bus/src/text/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,5 +399,5 @@ fn append_indicators(chunks: Vec<String>) -> Vec<String> {
}

#[cfg(test)]
#[path = "test.rs"]
#[path = "mod_tests.rs"]
mod tests;
1 change: 1 addition & 0 deletions src/approvals/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,5 @@ impl ApprovalSurface {
}

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
File renamed without changes.
1 change: 1 addition & 0 deletions src/delivery/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ pub use types::{
};

#[cfg(test)]
#[path = "mod_tests.rs"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update documentation paths after renaming the suites

After this rename, docs/spec/tinychannels-migration-remaining-plan.md still points readers to the now-deleted src/delivery/test.rs at line 130 and src/relay/test.rs at line 148. Anyone following the G2 or G4 test-coverage notes now reaches nonexistent files; update both references to their new mod_tests.rs paths.

Useful? React with 👍 / 👎.

mod test;
File renamed without changes.
1 change: 1 addition & 0 deletions src/delivery/progressive/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,5 @@ pub fn channel_supports_progressive_ui(channel: &str) -> bool {
}

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
File renamed without changes.
1 change: 1 addition & 0 deletions src/harness/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ pub use types::{
};

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
File renamed without changes.
1 change: 1 addition & 0 deletions src/relay/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ pub use websocket::{
};

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
File renamed without changes.
1 change: 1 addition & 0 deletions src/remote/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,4 +329,5 @@ async fn new_session(
}

#[cfg(test)]
#[path = "mod_tests.rs"]
mod test;
File renamed without changes.
Loading