feat(client): make all sources available in tests (#44725)
* feat: make all sources available in tests The original contents of all files (index.html, script.js etc.) will be accessible in tests. For example __sources['index.html'] gets the original html file and nothing else. * feat: use __file to get user code
This commit is contained in:
committed by
GitHub
parent
137edc2fb3
commit
cde1407f58
@ -675,7 +675,11 @@ async function initializeTestRunner(build, sources, code, loadEnzyme) {
|
||||
await page.evaluate(
|
||||
async (code, sources, loadEnzyme) => {
|
||||
const getUserInput = fileName => sources[fileName];
|
||||
await document.__initTestFrame({ code, getUserInput, loadEnzyme });
|
||||
await document.__initTestFrame({
|
||||
code: sources,
|
||||
getUserInput,
|
||||
loadEnzyme
|
||||
});
|
||||
},
|
||||
code,
|
||||
sources,
|
||||
|
Reference in New Issue
Block a user