@isagalaev @schlink just `pub mod foo;`
In the `Cargo.toml`
```
[lib]
name = "core"
```
Then in tests/whatever.rs
```
extern crate core;
#[cfg(test)]
mod tests_server { /* Your test */ }
```
Unless if you want to test your private stuff, you can add the tests directly in the files.