(s: MagicString)
| 1153 | const original = 'const a = 1;\nconst b = 2;\n\nexport { a, b };\n' |
| 1154 | |
| 1155 | const build = (s: MagicString) => { |
| 1156 | s.prepend('// header\n') |
| 1157 | s.appendLeft(12, '\nconst inserted = 3;') |
| 1158 | s.overwrite(13, 25, 'const b = 20;\nconst c = 30;') |
| 1159 | s.append('// footer\n') |
| 1160 | } |
| 1161 | |
| 1162 | const generated = new MagicString(original) |
| 1163 | build(generated) |
no test coverage detected