Christopher Willis-Ford
058685f41e
fix: use web-worker to replace tiny-worker and worker-loader
...
for webpack 5 compatibility
2024-03-04 11:10:29 -08:00
Christopher Willis-Ford
8dbcc1fc8f
style: fix hasOwnProperty lint complaints
2023-12-15 17:40:05 -08:00
Christopher Willis-Ford
bd51da51eb
Revert "fix: disable metadata for now"
2023-10-03 12:41:03 -07:00
Christopher Willis-Ford
95912963ce
fix: disable metadata for now
2023-10-02 18:18:34 -07:00
Christopher Willis-Ford
e696e3548b
fix: don't set run ID until storage exists (also add tests)
2023-03-31 09:07:06 -07:00
Christopher Willis-Ford
e4f7732efb
test(execute): allow *.sb and *.sb3 'execute' tests
2022-07-06 13:35:38 -07:00
Christopher Willis-Ford
e2f96762de
test(clone-cleanup): go back to using an SB2
...
Part of the motivation for this test is to verify compatibility with
Scratch 2.0 / SB2 behavior, so we shouldn't change the project to an SB3
file without very good reason.
2022-06-10 10:14:17 -07:00
Christopher Willis-Ford
d8fc81a8b5
test(execute): try to make 'execute' test more reliable
2022-06-07 14:55:38 -07:00
Christopher Willis-Ford
840ffb5df0
test: don't use process.exit to end tests
...
Newer versions of `tap` run more asynchronously, so sometimes using `process.nextTick(process.exit)`
to end a test would prevent the test from completing correctly. Removing all instances of
`process.nextTick(process.exit)` put tests into three categories:
* the test still worked correctly -- no fixup needed.
* the test would hang because the VM's `_steppingInterval` was keeping
Node alive. These tests call a new `quit()` method which ends the
stepping interval.
* the `load-extensions` test needed special attention because the "Video
Sensing" extension starts its own loop using `setTimeout`. I added a
`_stopLoop()` method on the extension and directly call that from the
test. I'm not completely happy with this solution but anything more
general would likely require a change to the extension spec, so I'm
leaving that as a followup task.
2022-06-07 11:44:06 -07:00
Christopher Willis-Ford
605b1c2386
test(clone-cleanup): improve clone-cleanup test reliability
...
Previously the test relied on the project's `wait` blocks running at roughly real time. Now, the
project drives the timing using `say` blocks.
2022-06-07 11:44:06 -07:00
Karishma Chadha
2ff83ce667
Add tests for missing and corrupt pngs in sb3 and sprite3 files
2022-05-23 19:54:45 -04:00
Karishma Chadha
3e193565ee
Hook up error handling to bitmap loading flow and add tests for loading missing and corrupt bitmpas from sb2 and sprite2 files
2022-05-23 19:54:45 -04:00
Karishma Chadha
59f3c8afe9
Add sb2 and sprite2 tests for a corrupted vector costume
2022-05-21 19:51:29 -04:00
Karishma Chadha
28c6daaaf7
Mock bitmap loading and add sb2 and sprite2 tests for a missing svg costume
2022-05-21 19:51:29 -04:00
Karishma Chadha
8ab21dd701
Handle error from sound failing to load (e.g. corrupted sound)
2022-05-19 17:45:27 -04:00
Karishma Chadha
4679d06ac0
Update storage and update 'loadSound' to handle null asset from storage. Track additional metadata for broken costumes: 'bitmapResolution' and 'dataFormat'.
2022-05-18 21:26:36 -04:00
Karishma Chadha
11f938f8a9
Update to latest version of storage which fixes issue where an HTML 404 page was being returned for missing asset data. Update VM to handle null assets properly.
2022-05-18 16:55:46 -04:00
Karishma Chadha
8b9ce99762
Add tests that serializing a costume does not save any data for assets that were missing when the project was first loaded
2022-05-16 17:33:21 -04:00
Karishma Chadha
70a78cf7db
Add tests for load costume error handling. Fix issue where asset data was not getting saved out properly.
2022-05-13 19:07:34 -04:00
adroitwhiz
3c9f7557f5
Replace new Buffer()
with Buffer.from()
...
This removes the deprecation warnings logged when tests are run.
2021-03-07 16:21:06 -05:00
adroitwhiz
53429f0917
Add test for renamed local lists
2020-03-12 17:00:58 -04:00
adroitwhiz
af860711be
Add test for loading renamed list monitors
2020-02-17 01:51:19 -05:00
Karishma Chadha
ebb3f29734
Add unit test for inline image in extension block. Update internal-extension integration test.
2019-09-20 21:49:49 -07:00
Karishma Chadha
9af2e4c086
Merge pull request #2161 from LLK/e16n
...
Supporting VM changes for extensionification
2019-06-18 18:53:20 -04:00
Christopher Willis-Ford
3b395a10d1
add test for extension methods receiving blockInfo
2019-04-19 14:35:35 -07:00
Michael "Z" Goddard
6ed3263ca9
test that scripts block cache is reset
2019-04-19 13:22:25 -04:00
Karishma Chadha
23136ad9c3
Revert "Cache hat block information for the runtime"
2019-04-17 16:05:24 -04:00
Karishma Chadha
a984d1ae9d
Merge pull request #1930 from mzgoddard/runtime-script-cache
...
Cache hat block information for the runtime
2019-04-17 15:55:47 -04:00
Christopher Willis-Ford
a1abcf3226
Add a comment clarifying the items in _blockInfo[0].blocks
2019-04-03 11:36:38 -07:00
Christopher Willis-Ford
87a88e2caf
Add a button to the CoreEx extension
2019-04-02 23:13:01 -07:00
Katie Broida
445ee46984
Merge pull request #1943 from ktbee/clock-timer-compat-fix
...
Start executing hats before other threads change values
2019-03-29 13:01:28 -04:00
Katie Broida
2a60391fb4
Make Scratch 3 project timer more compatible with Scratch 2 currentMSecs usage
...
These compatibility changes:
- Use runtime.currentMSecs for the Clock timer "now" value
- Start executing hats before other threads change values
- Update test and fixtures to work with earlier hat execution
- Add test for hat execution block order
2019-03-29 11:43:37 -04:00
Karishma Chadha
30c9b7fd84
Add tests and update core example to handle stage being undefined.
2019-03-22 12:20:07 -04:00
Michael "Z" Goddard
1862e5bb27
test that scripts block cache is reset
2019-03-12 17:09:59 -04:00
Paul Kaplan
3b203a2a9b
Merge pull request #1995 from paulkaplan/is-discrete
...
Support isDiscrete flag on monitors
2019-02-13 11:19:51 -05:00
chrisgarrity
7f37934eae
rewrite readProjectFile to automatically handle nested project jsons
2019-02-12 11:24:26 +01:00
Paul Kaplan
6754fa9334
Add isDiscrete to monitor record, update sb2,3 and conversion tests
2019-02-11 11:09:01 -05:00
Paul Kaplan
8c92d195f7
Update monitors sb2 integration test for editing locally.
...
I cannot open the sb2 file without modifying the width/height of the lists, and editing+rezipping does not seem to work for me, so I need to change this width/height before I can make real changes to the tests.
2019-02-11 10:59:07 -05:00
chrisgarrity
7e9297145d
Add test for nested sb2
2019-02-11 10:24:34 +01:00
picklesrus
b904f19c1d
Fix loading broadcast messages with special characters for projects that were converted from 2.0.
2019-02-06 16:58:46 -05:00
picklesrus
aead1ba8f4
Fix a typo in the variable test.
2019-02-06 16:53:25 -05:00
picklesrus
ecbfcd78bd
Fix sb2 loading of broadcast messages with special characters.
2019-02-06 16:48:39 -05:00
Karishma Chadha
4e924bf4b5
Merge pull request #1973 from kchadha/fix-variable-characters
...
Fix variable characters
2019-02-05 17:01:43 -05:00
Karishma Chadha
cd8de5f156
Add tests! =]
2019-02-04 19:05:44 -05:00
Karishma Chadha
df823a06f6
Add tests for project changed state.
2019-01-30 10:59:25 -05:00
Karishma Chadha
a9cf509a55
Merge pull request #1941 from kchadha/add-runtime-to-blocks
...
Add reference for `runtime` to blocks container
2019-01-30 10:57:45 -05:00
Karishma Chadha
7ac8721aa5
Add references to runtime to existing calls to Blocks constructor in tests.
2019-01-28 19:30:42 -05:00
Karishma Chadha
18e9a08775
Use beforeEach instead of a fake set up test
2019-01-28 10:53:42 -05:00
Karishma Chadha
94fa3d56c8
Fix saving and loading of slider min max values. Add test for sb2 to sb3 conversion that tests all montior properties remain the same after save and load.
2019-01-25 14:14:46 -05:00
Karishma Chadha
0bf5d8ab90
Update VM getPlaygroundData function to remove circular dependency in blockContainer. It wasn't being used by the tests or the playground and it is not an issue with actual project serialization. Update test to stop passing in runtime to blocklyListen function.
2019-01-24 15:26:16 -05:00