Write the TS unicode fixture as UTF8 regardless of platform default

The regression test wrote its fixture through write_text with no
encoding, so it silently depended on the platform's default text
encoding. On a Windows machine whose default code page cannot encode
the accented character the fixture uses, the write itself raises
before the TypeScript extractor is ever called, failing the test for
a reason that has nothing to do with extraction.

Pass encoding equals utf8 explicitly so the fixture writes the same
way on every platform.

(cherry picked from commit 469904a0ce)
This commit is contained in:
ayushcodes10 authored and safishamsi committed 2026-11-07 17:14:03 +00:00
1 parent 16218bfc80
commit 499137470d
1 file changed
+1 -1
@@ -47,7 +47,7 @@ export function create() {
return handler;
}
export async function load() { return import("./runtime"); }
''')
''', encoding='utf-8')
(tmp_path / 'runtime.ts').write_text('export const value = 1;')
result = extract_js(path)
labels = {n['id']: n['label'] for n in result['nodes']}