Initial commit of 001code-html Scratch frontend project.

Includes scratch-gui, scratch-vm, scratch-blocks, scratch-render, scratch-l10n, and deployment config.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-16 15:37:45 +08:00
commit 6e0a1fbcbb
11350 changed files with 965674 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import defaultProjectGenerator from '../../../src/lib/default-project/index.js';
describe('defaultProject', () => {
// This test ensures that the assets referenced in the default project JSON
// do not get out of sync with the raw assets that are included alongside.
// see https://github.com/LLK/scratch-gui/issues/4844
test('assets referenced by the project are included', () => {
const translatorFn = () => '';
const defaultProject = defaultProjectGenerator(translatorFn);
const includedAssetIds = defaultProject.map(obj => obj.id);
const projectData = JSON.parse(defaultProject[0].data);
projectData.targets.forEach(target => {
target.costumes.forEach(costume => {
expect(includedAssetIds.includes(costume.assetId)).toBe(true);
});
target.sounds.forEach(sound => {
expect(includedAssetIds.includes(sound.assetId)).toBe(true);
});
});
});
});