@@ -86,55 +86,6 @@ function setup(localPlugins: IStringDictionary, previewAppPlugins: IStringDictio
8686
8787describe ( "previewAppPluginsService" , ( ) => {
8888 describe ( "comparePluginsOnDevice without bundle" , ( ) => {
89- it ( "should persist warnings per preview app's version" , async ( ) => {
90- const localPlugins = {
91- "nativescript-facebook" : "2.2.3" ,
92- "nativescript-theme-core" : "1.0.4" ,
93- "tns-core-modules" : "4.2.0"
94- } ;
95- const previewAppPlugins = {
96- "nativescript-theme-core" : "2.0.4" ,
97- "tns-core-modules" : "4.2.0"
98- } ;
99- const injector = createTestInjector ( localPlugins ) ;
100- const previewAppPluginsService = injector . resolve ( "previewAppPluginsService" ) ;
101-
102- let isGetDevicePluginsCalled = false ;
103- const originalGetDevicePlugins = ( < any > previewAppPluginsService ) . getDevicePlugins ;
104- ( < any > previewAppPluginsService ) . getDevicePlugins = ( device : Device ) => {
105- isGetDevicePluginsCalled = true ;
106- return originalGetDevicePlugins ( device ) ;
107- } ;
108- let isGetLocalPluginsCalled = false ;
109- const originalGetLocalPlugins = ( < any > previewAppPluginsService ) . getLocalPlugins ;
110- ( < any > previewAppPluginsService ) . getLocalPlugins = ( ) => {
111- isGetLocalPluginsCalled = true ;
112- return originalGetLocalPlugins . apply ( previewAppPluginsService , [ projectDir ] ) ;
113- } ;
114-
115- const previewLiveSyncData = createPreviewLiveSyncData ( { bundle : false } ) ;
116-
117- await previewAppPluginsService . comparePluginsOnDevice ( previewLiveSyncData , createDevice ( JSON . stringify ( previewAppPlugins ) ) ) ;
118-
119- const expectedWarnings = [
120- util . format ( PluginComparisonMessages . PLUGIN_NOT_INCLUDED_IN_PREVIEW_APP , "nativescript-facebook" , deviceId ) ,
121- util . format ( PluginComparisonMessages . LOCAL_PLUGIN_WITH_DIFFERENCE_IN_MAJOR_VERSION , "nativescript-theme-core" , "1.0.4" , "2.0.4" )
122- ] ;
123- assert . isTrue ( isGetDevicePluginsCalled ) ;
124- assert . isTrue ( isGetLocalPluginsCalled ) ;
125- assert . deepEqual ( warnParams , expectedWarnings ) ;
126-
127- isGetDevicePluginsCalled = false ;
128- isGetLocalPluginsCalled = false ;
129- warnParams = [ ] ;
130-
131- await previewAppPluginsService . comparePluginsOnDevice ( previewLiveSyncData , createDevice ( JSON . stringify ( previewAppPlugins ) ) ) ;
132-
133- assert . isFalse ( isGetDevicePluginsCalled ) ;
134- assert . isFalse ( isGetLocalPluginsCalled ) ;
135- assert . deepEqual ( warnParams , expectedWarnings ) ;
136- } ) ;
137-
13889 const testCases = [
13990 {
14091 name : "should show warning for plugin not included in preview app" ,
0 commit comments