| 1 | import { describe, expect, it } from 'vitest'; |
| 2 | |
| 3 | import { ancestorsOf } |
| 4 | |
| 5 | describe('ancestorsOf', () |
| 6 | it('walks a file up to the repository root', |
| 7 | expect(ancestorsOf('src/a/b.ts |
| 8 | 'src/a/b.ts', |
| 9 | 'src/a', |
| 10 | 'src', |
| 11 | '', |
| 12 | ]); |
| 13 | }); |
| 14 | |
| 15 | it('gives a top-level file just itself and the root', |
| 16 | expect(ancestorsOf('README.md |
| 17 | }); |
| 18 | }); |