@@ -173,7 +173,7 @@ struct RuntimeConfig {
173173const DEFAULT_TIMEOUT : Duration = Duration :: from_secs (30 );
174174```
175175
176- ** Formatting** : Use ` cargo fmt ` to format code
176+ ** Formatting** : Use ` cargo fmt ` to format code and ` andromeda fmt ` for TypeScript files.
177177
178178** Linting** : Use ` cargo clippy ` to check for common issues
179179
@@ -228,38 +228,6 @@ cargo test --test integration
228228
229229### Writing Tests
230230
231- #### Unit Tests
232-
233- ``` rust
234- #[cfg(test)]
235- mod tests {
236- use super :: * ;
237-
238- #[test]
239- fn test_extension_registration () {
240- let mut runtime = Runtime :: new ();
241- let extension = TestExtension :: new ();
242-
243- runtime . register_extension (extension );
244-
245- assert! (runtime . has_extension (" test" ));
246- }
247- }
248- ```
249-
250- #### Integration Tests
251-
252- ``` rust
253- // tests/integration_test.rs
254- use andromeda_cli :: run_script;
255-
256- #[tokio:: test]
257- async fn test_script_execution () {
258- let result = run_script (" examples/console.ts" ). await ;
259- assert! (result . is_ok ());
260- }
261- ```
262-
263231#### TypeScript Examples
264232
265233Ensure examples work correctly:
@@ -366,20 +334,23 @@ git commit -m "test: add integration tests for file system"
366334
367335 ``` typescript
368336 // runtime/src/ext/new_api/mod.ts
369- declare global {
370- const newApi: {
371- methodName(param : string ): Promise <Result >;
372- };
337+ function methodName(param : string ): Promise <Result > {
338+ // Implementation
373339 }
340+ // TODO: once imports are supported, use `export` syntax
374341 ```
375342
3763434 . ** Write tests** :
377344
378- ``` rust
379- #[test]
380- fn test_new_api_functionality () {
381- // Test implementation
382- }
345+ ``` typescript
346+ // tests/new_api.test.ts
347+
348+ describe (" New API" , () => {
349+ it (" should return expected result" , async () => {
350+ const result = await methodName (" test" );
351+ expect (result ).toEqual ({ success: true });
352+ });
353+ });
383354 ```
384355
3853565 . ** Add examples** :
@@ -393,7 +364,7 @@ git commit -m "test: add integration tests for file system"
3933646 . ** Update documentation** :
394365 - API reference in ` docs/api/ `
395366 - Tutorial if complex
396- - Update main README if significant
367+ - Update index.md if significant
397368
398369### Debugging
399370
@@ -415,9 +386,6 @@ rust-gdb target/debug/andromeda
415386``` bash
416387# Compile TypeScript separately
417388cargo run -- compile script.ts
418-
419- # Run with verbose output
420- cargo run -- run script.ts --verbose
421389```
422390
423391### Performance Considerations
@@ -430,16 +398,6 @@ When contributing:
430398- Consider async/await overhead
431399- Test with realistic workloads
432400
433- ``` rust
434- // Use criterion for benchmarks
435- #[bench]
436- fn bench_extension_call (b : & mut Bencher ) {
437- b . iter (|| {
438- // Benchmark code
439- });
440- }
441- ```
442-
443401## Community
444402
445403### Communication
@@ -506,7 +464,9 @@ Help expand platform support:
506464- [ Rust Programming Language] ( https://doc.rust-lang.org/ )
507465- [ TypeScript Documentation] ( https://www.typescriptlang.org/docs/ )
508466- [ Web APIs Standards] ( https://developer.mozilla.org/en-US/docs/Web/API )
509- - [ V8 Engine Documentation] ( https://v8.dev/docs )
467+ - [ Nova Engine] ( https://trynova.dev )
468+ - [ WinterTC] ( https://wintertc.org )
469+ - [ Andromeda GitHub Repository] ( https://github.com/tryandromeda/andromeda )
510470
511471Thank you for contributing to Andromeda! Your efforts help make it a better
512472runtime for everyone.
0 commit comments