mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
feat: remove 'original' and __file (#59446)
This commit is contained in:
committed by
GitHub
parent
d91f57b12b
commit
350424701f
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user