@@ -16,17 +16,40 @@ test('importing ScratchX/.sbx project', async t => {
16
16
] ,
17
17
sounds : [ ] ,
18
18
costumes : [ ] ,
19
- children : [ ]
19
+ children : [ ] ,
20
+ info : {
21
+ savedExtensions : [
22
+ {
23
+ menus : {
24
+ // not important for this test
25
+ } ,
26
+ extensionName : 'Spotify' ,
27
+ javascriptURL : 'https://ericrosenbaum.github.io/spotify-extension/extension.js' ,
28
+ blockSpecs : [
29
+ // not important for this test
30
+ ]
31
+ } ,
32
+ {
33
+ extensionName : 'Weather extension' ,
34
+ javascriptURL : 'http://khanning.github.io/scratch-weather-extension/weather_extension.js'
35
+ }
36
+ ]
37
+ }
20
38
} ,
21
39
rt
22
40
) ;
23
41
24
- const extensions = deserialized . extensions . extensionIDs ;
25
- t . equal ( extensions . size , 4 ) ;
26
- t . ok ( extensions . has ( 'sbxtexttospeech' ) ) ;
27
- t . ok ( extensions . has ( 'sbxspotify' ) ) ;
28
- t . ok ( extensions . has ( 'sbxweatherextension' ) ) ;
29
- t . ok ( extensions . has ( 'sbxsynthextension' ) ) ;
42
+ const extensionIDs = deserialized . extensions . extensionIDs ;
43
+ t . equal ( extensionIDs . size , 4 ) ;
44
+ t . ok ( extensionIDs . has ( 'sbxtexttospeech' ) ) ;
45
+ t . ok ( extensionIDs . has ( 'sbxspotify' ) ) ;
46
+ t . ok ( extensionIDs . has ( 'sbxweatherextension' ) ) ;
47
+ t . ok ( extensionIDs . has ( 'sbxsynthextension' ) ) ;
48
+
49
+ const extensionURLs = deserialized . extensions . extensionURLs ;
50
+ t . equal ( extensionURLs . size , 2 ) ;
51
+ t . equal ( extensionURLs . get ( 'sbxspotify' ) , 'https://ericrosenbaum.github.io/spotify-extension/extension.js' ) ;
52
+ t . equal ( extensionURLs . get ( 'sbxweatherextension' ) , 'http://khanning.github.io/scratch-weather-extension/weather_extension.js' ) ;
30
53
31
54
const stage = deserialized . targets [ 0 ] ;
32
55
const blocks = Object . values ( stage . blocks . _blocks ) ;
0 commit comments