()
| 44 | } |
| 45 | |
| 46 | async function buildRustWorkspace(): Promise<string> { |
| 47 | const root = tmpRoot(); |
| 48 | const cfgDir = path.join(root, 'src', 'configurator'); |
| 49 | fs.mkdirSync(cfgDir, { recursive: true }); |
| 50 | fs.writeFileSync( |
| 51 | path.join(root, 'Cargo.toml'), |
| 52 | `[package]\nname = "fixture"\nversion = "0.1.0"\nedition = "2021"\n[lib]\npath = "src/lib.rs"\n` |
| 53 | ); |
| 54 | fs.writeFileSync(path.join(root, 'src', 'lib.rs'), `pub mod configurator;\npub mod scheduler;\n`); |
| 55 | fs.writeFileSync( |
| 56 | path.join(cfgDir, 'mod.rs'), |
| 57 | `pub mod stage_apply;\npub mod stage_detect;\n` |
| 58 | ); |
| 59 | fs.writeFileSync( |
| 60 | path.join(cfgDir, 'stage_apply.rs'), |
| 61 | `pub async fn run() -> Result<(), ()> {\n render_and_write();\n Ok(())\n}\n\nfn render_and_write() {}\n` |
| 62 | ); |
| 63 | fs.writeFileSync( |
| 64 | path.join(cfgDir, 'stage_detect.rs'), |
| 65 | `pub async fn run() -> Result<(), ()> { Ok(()) }\n` |
| 66 | ); |
| 67 | fs.writeFileSync( |
| 68 | path.join(root, 'src', 'scheduler.rs'), |
| 69 | `pub fn run_due_tasks() -> Result<(), ()> { Ok(()) }\n` |
| 70 | ); |
| 71 | return root; |
| 72 | } |
| 73 | |
| 74 | describe.skipIf(!HAS_SQLITE)('matchesSymbol — module-qualified lookups (#173)', () => { |
| 75 | let projectRoot: string; |
no test coverage detected