feat: remove 'original' and __file (#59446)

This commit is contained in:
Oliver Eyton-Williams
2025-03-26 22:34:06 +01:00
committed by GitHub
parent d91f57b12b
commit 350424701f
10 changed files with 5 additions and 25 deletions
@@ -11,13 +11,7 @@ frameDocument.__initTestFrame = initTestFrame;
async function initTestFrame(e: InitTestFrameArg = { code: {} }) {
const code = (e.code.contents || '').slice();
const __file = (id?: string) => {
if (id && e.code.original) {
return e.code.original[id];
} else {
return code;
}
};
const editableContents = (e.code.editableContents || '').slice();
// __testEditable allows test authors to run tests against a transitory dom
// element built using only the code in the editable region.
-1
View File
@@ -18,7 +18,6 @@ export interface InitTestFrameArg {
code: {
contents?: string;
editableContents?: string;
original?: { [id: string]: string | null };
};
getUserInput?: (fileName: string) => string;
loadEnzyme?: () => void;
@@ -16,7 +16,6 @@ interface PythonRunEvent extends MessageEvent {
code: {
contents: string;
editableContents: string;
original: { [id: string]: string };
};
firstTest: unknown;
testString: string;
@@ -21,7 +21,6 @@ interface PythonRunEvent extends MessageEvent {
code: {
contents: string;
editableContents: string;
original: { [id: string]: string };
};
};
}
@@ -103,7 +103,6 @@ interface TestEvaluatorEvent extends MessageEvent {
code: {
contents: string;
editableContents: string;
original: { [id: string]: string };
};
firstTest: unknown;
testString: string;