| 1 | import { describe, expect, it } from 'vitest'; |
| 2 | |
| 3 | import { parseLfsPointer } |
| 4 | |
| 5 | const OID = ' |
| 6 | |
| 7 | describe('parseLfsPointer', () |
| 8 | it('reads the oid and size, past extension keys', |
| 9 | const pointer = |
| 10 | expect(parseLfsPointer(Buffer |
| 11 | oid: OID, |
| 12 | size: 12345, |
| 13 | }); |
| 14 | }); |
| 15 | |
| 16 | it.each([ |
| 17 | ['an ordinary file', 'hello\n |
| 18 | [ |
| 19 | 'a pointer missing its size', |
| 20 | `version https://git-lfs.github.com/spec/v1\noid sha256:${OID} |
| 21 | ], |
| 22 | [ |
| 23 | 'a file past the pointer limit', |
| 24 | `version https://git-lfs.github.com/spec/v1\noid sha256:${OID} |
| 25 | ], |
| 26 | ])('returns null for %s', (_ |
| 27 | expect(parseLfsPointer(Buffer |
| 28 | }); |
| 29 | }); |