(location?: number)
| 167 | |
| 168 | it('ignores sourcemap locations past the end of their source', () => { |
| 169 | const flatten = (location?: number) => { |
| 170 | const a = new MagicString('ab') |
| 171 | if (location !== undefined) |
| 172 | a.addSourcemapLocation(location) |
| 173 | const b = new Bundle() |
| 174 | b.addSource(a) |
| 175 | b.addSource(new MagicString('cd')) |
| 176 | return b.toMagicString().generateDecodedMap() |
| 177 | } |
| 178 | |
| 179 | // 3 is past the end of 'ab' but would land on 'd' once offset into the bundle |
| 180 | assert.deepEqual(flatten(3), flatten()) |
no test coverage detected