-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Always create namespace variables * Clean up import expression resolution * Implement dynamic import facade chunk prevention * Support compact mode * Handle importing entries with strict, tainted and missing facades * Do not run CJS dynamic imports synchronously * Improve coverage
- Loading branch information
1 parent
468010b
commit f514c76
Showing
215 changed files
with
1,000 additions
and
459 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
const { readdirSync, copydirSync, copyFileSync, rimrafSync } = require('sander'); | ||
const { resolve, join } = require('path'); | ||
|
||
const basePath = resolve(__dirname, '../test'); | ||
|
||
const formPath = join(basePath, 'form/samples'); | ||
const formDirsToHandle = readdirSync(formPath); | ||
for (const dir of formDirsToHandle) { | ||
const testPath = join(formPath, dir); | ||
const testFiles = readdirSync(testPath); | ||
if (!testFiles.includes('_config.js')) { | ||
formDirsToHandle.push(...testFiles.map(filename => join(dir, filename))); | ||
} else if (testFiles.includes('_actual')) { | ||
const expectedPath = join(testPath, '_expected'); | ||
rimrafSync(expectedPath); | ||
copydirSync(join(testPath, '_actual')).to(expectedPath); | ||
} else if (testFiles.includes('_actual.js')) { | ||
copyFileSync(join(testPath, '_actual.js')).to(join(testPath, '_expected.js')); | ||
} else { | ||
throw new Error(`Could not find test output in ${testPath}`); | ||
} | ||
} | ||
|
||
const chunkingPath = join(basePath, 'chunking-form/samples'); | ||
const chunkingDirsToHandle = readdirSync(chunkingPath); | ||
for (const dir of chunkingDirsToHandle) { | ||
const testPath = join(chunkingPath, dir); | ||
const testFiles = readdirSync(testPath); | ||
if (!testFiles.includes('_config.js')) { | ||
chunkingDirsToHandle.push(...testFiles.map(filename => join(dir, filename))); | ||
} else if (testFiles.includes('_actual')) { | ||
const expectedPath = join(testPath, '_expected'); | ||
rimrafSync(expectedPath); | ||
copydirSync(join(testPath, '_actual')).to(expectedPath); | ||
} else { | ||
throw new Error(`Could not find test output in ${testPath}`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.