@@ -415,55 +415,11 @@ describe("previewAppPluginsService", () => {
415415 } ) ;
416416 } ) ;
417417 describe ( "getExternalPlugins" , ( ) => {
418- const testCases = [
419- {
420- name : "should return default plugins(`tns-core-modules`, `tns-core-modules-widgets` and `@angular`) when no plugins are provided" ,
421- plugins : { } ,
422- expectedPlugins : [ "tns-core-modules" , "tns-core-modules-widgets" , "@angular" ]
423- } ,
424- {
425- name : "should include `nativescript-vue`" ,
426- plugins : { "nativescript-vue" : "1.2.3" } ,
427- expectedPlugins : [ "nativescript-vue" , "tns-core-modules" , "tns-core-modules-widgets" , "@angular" ]
428- } ,
429- {
430- name : "should include `nativescript-intl`" ,
431- plugins : { "nativescript-intl" : "4.5.6" } ,
432- expectedPlugins : [ "nativescript-intl" , "tns-core-modules" , "tns-core-modules-widgets" , "@angular" ]
433- } ,
434- {
435- name : "should include `nativescript-angular`" ,
436- plugins : { "nativescript-angular" : "7.8.9" } ,
437- expectedPlugins : [ "nativescript-angular" , "tns-core-modules" , "tns-core-modules-widgets" , "@angular" ]
438- } ,
439- {
440- name : "should exclude `nativescript-theme-core`" ,
441- plugins : { "nativescript-theme-core" : "1.3.5" } ,
442- expectedPlugins : [ "tns-core-modules" , "tns-core-modules-widgets" , "@angular" ]
443- } ,
444- {
445- name : "should return plugins that contain `nativescript` in their names" ,
446- plugins : {
447- "nativescript-facebook" : "4.5.6"
448- } ,
449- expectedPlugins : [ "nativescript-facebook" , "tns-core-modules" , "tns-core-modules-widgets" , "@angular" ]
450- } ,
451- {
452- name : "should not return plugins that do not contain `nativescript` in their names" ,
453- plugins : {
454- lodash : "4.5.6" ,
455- xmlhttprequest : "1.2.3"
456- } ,
457- expectedPlugins : [ "tns-core-modules" , "tns-core-modules-widgets" , "@angular" ]
458- }
459- ] ;
460-
461- _ . each ( testCases , testCase => {
462- it ( `${ testCase . name } ` , ( ) => {
463- const { previewAppPluginsService, device } = setup ( testCase . plugins , testCase . plugins ) ;
464- const actualPlugins = previewAppPluginsService . getExternalPlugins ( device ) ;
465- assert . deepEqual ( actualPlugins , testCase . expectedPlugins ) ;
466- } ) ;
418+ it ( "should exclude `nativescript-theme-core`" , ( ) => {
419+ const plugins = { "nativescript-theme-core" : "1.3.5" } ;
420+ const { previewAppPluginsService, device } = setup ( plugins , plugins ) ;
421+ const actualPlugins = previewAppPluginsService . getExternalPlugins ( device ) ;
422+ assert . notInclude ( actualPlugins , "nativescript-theme-core" ) ;
467423 } ) ;
468424 } ) ;
469425} ) ;
0 commit comments