@@ -72,38 +72,18 @@ describe("displayWarningPrompts", () => {
72
72
logLabeledStub . restore ( ) ;
73
73
} ) ;
74
74
75
- it ( "should not warn if from trusted publisher and not experimental " , async ( ) => {
75
+ it ( "should not warn if from trusted publisher" , async ( ) => {
76
76
const publisherId = "firebase" ;
77
77
78
- await warnings . displayWarningPrompts (
79
- publisherId ,
80
- RegistryLaunchStage . BETA ,
81
- testExtensionVersion
82
- ) ;
78
+ await warnings . displayWarningPrompts ( publisherId , testExtensionVersion ) ;
83
79
84
80
expect ( logLabeledStub ) . to . not . have . been . called ;
85
81
} ) ;
86
82
87
- it ( "should warn if experimental" , async ( ) => {
88
- const publisherId = "firebase" ;
89
-
90
- await warnings . displayWarningPrompts (
91
- publisherId ,
92
- RegistryLaunchStage . EXPERIMENTAL ,
93
- testExtensionVersion
94
- ) ;
95
-
96
- expect ( logLabeledStub ) . to . have . been . calledWithMatch ( "extensions" , "experimental" ) ;
97
- } ) ;
98
-
99
83
it ( "should warn if the publisher is not on the approved publisher list" , async ( ) => {
100
84
const publisherId = "pubby-mcpublisher" ;
101
85
102
- await warnings . displayWarningPrompts (
103
- publisherId ,
104
- RegistryLaunchStage . BETA ,
105
- testExtensionVersion
106
- ) ;
86
+ await warnings . displayWarningPrompts ( publisherId , testExtensionVersion ) ;
107
87
108
88
expect ( logLabeledStub ) . to . have . been . calledWithMatch ( "extensions" , "Early Access Program" ) ;
109
89
} ) ;
@@ -124,7 +104,7 @@ describe("displayWarningsForDeploy", () => {
124
104
logLabeledStub . restore ( ) ;
125
105
} ) ;
126
106
127
- it ( "should not warn or prompt if from trusted publisher and not experimental " , async ( ) => {
107
+ it ( "should not warn or prompt if from trusted publisher" , async ( ) => {
128
108
const toCreate = [
129
109
testInstanceSpec ( "firebase" , "ext-id-1" , RegistryLaunchStage . GA ) ,
130
110
testInstanceSpec ( "firebase" , "ext-id-2" , RegistryLaunchStage . GA ) ,
@@ -136,18 +116,6 @@ describe("displayWarningsForDeploy", () => {
136
116
expect ( logLabeledStub ) . to . not . have . been . called ;
137
117
} ) ;
138
118
139
- it ( "should prompt if experimental" , async ( ) => {
140
- const toCreate = [
141
- testInstanceSpec ( "firebase" , "ext-id-1" , RegistryLaunchStage . EXPERIMENTAL ) ,
142
- testInstanceSpec ( "firebase" , "ext-id-2" , RegistryLaunchStage . EXPERIMENTAL ) ,
143
- ] ;
144
-
145
- const warned = await warnings . displayWarningsForDeploy ( toCreate ) ;
146
-
147
- expect ( warned ) . to . be . true ;
148
- expect ( logLabeledStub ) . to . have . been . calledWithMatch ( "extensions" , "experimental" ) ;
149
- } ) ;
150
-
151
119
it ( "should prompt if the publisher is not on the approved publisher list" , async ( ) => {
152
120
const toCreate = [
153
121
testInstanceSpec ( "pubby-mcpublisher" , "ext-id-1" , RegistryLaunchStage . GA ) ,
@@ -159,17 +127,4 @@ describe("displayWarningsForDeploy", () => {
159
127
expect ( warned ) . to . be . true ;
160
128
expect ( logLabeledStub ) . to . have . been . calledWithMatch ( "extensions" , "Early Access Program" ) ;
161
129
} ) ;
162
-
163
- it ( "should show multiple warnings at once if triggered" , async ( ) => {
164
- const toCreate = [
165
- testInstanceSpec ( "pubby-mcpublisher" , "ext-id-1" , RegistryLaunchStage . GA ) ,
166
- testInstanceSpec ( "firebase" , "ext-id-2" , RegistryLaunchStage . EXPERIMENTAL ) ,
167
- ] ;
168
-
169
- const warned = await warnings . displayWarningsForDeploy ( toCreate ) ;
170
-
171
- expect ( warned ) . to . be . true ;
172
- expect ( logLabeledStub ) . to . have . been . calledWithMatch ( "extensions" , "Early Access Program" ) ;
173
- expect ( logLabeledStub ) . to . have . been . calledWithMatch ( "extensions" , "experimental" ) ;
174
- } ) ;
175
130
} ) ;
0 commit comments