11/* eslint-disable @typescript-eslint/no-non-null-assertion */
2- import { data , DescriptionDictionary , FeatureFlags } from "@actions/expressions" ;
2+ import { data , DescriptionDictionary } from "@actions/expressions" ;
33import { CompletionItem , CompletionItemKind , MarkupContent } from "vscode-languageserver-types" ;
44import { complete , getExpressionInput } from "./complete.js" ;
55import { ContextProviderConfig } from "./context-providers/config.js" ;
@@ -69,8 +69,7 @@ describe("expressions", () => {
6969 it ( "single region" , async ( ) => {
7070 const input = "run-name: ${{ | }}" ;
7171 const result = await complete ( ...getPositionFromCursor ( input ) , {
72- contextProviderConfig,
73- featureFlags : new FeatureFlags ( { allowCaseFunction : true } )
72+ contextProviderConfig
7473 } ) ;
7574
7675 expect ( result . map ( x => x . label ) ) . toEqual ( [
@@ -113,8 +112,7 @@ describe("expressions", () => {
113112 it ( "single region with existing input" , async ( ) => {
114113 const input = "run-name: ${{ g| }}" ;
115114 const result = await complete ( ...getPositionFromCursor ( input ) , {
116- contextProviderConfig,
117- featureFlags : new FeatureFlags ( { allowCaseFunction : true } )
115+ contextProviderConfig
118116 } ) ;
119117
120118 expect ( result . map ( x => x . label ) ) . toEqual ( [
@@ -135,8 +133,7 @@ describe("expressions", () => {
135133 it ( "single region with existing condition" , async ( ) => {
136134 const input = "run-name: ${{ g| == 'test' }}" ;
137135 const result = await complete ( ...getPositionFromCursor ( input ) , {
138- contextProviderConfig,
139- featureFlags : new FeatureFlags ( { allowCaseFunction : true } )
136+ contextProviderConfig
140137 } ) ;
141138
142139 expect ( result . map ( x => x . label ) ) . toEqual ( [
@@ -157,8 +154,7 @@ describe("expressions", () => {
157154 it ( "multiple regions with partial function" , async ( ) => {
158155 const input = "run-name: Run a ${{ inputs.test }} one-line script ${{ from|('test') == inputs.name }}" ;
159156 const result = await complete ( ...getPositionFromCursor ( input ) , {
160- contextProviderConfig,
161- featureFlags : new FeatureFlags ( { allowCaseFunction : true } )
157+ contextProviderConfig
162158 } ) ;
163159
164160 expect ( result . map ( x => x . label ) ) . toEqual ( [
@@ -179,8 +175,7 @@ describe("expressions", () => {
179175 it ( "multiple regions - first region" , async ( ) => {
180176 const input = "run-name: test-${{ git| == 1 }}-${{ github.event }}" ;
181177 const result = await complete ( ...getPositionFromCursor ( input ) , {
182- contextProviderConfig,
183- featureFlags : new FeatureFlags ( { allowCaseFunction : true } )
178+ contextProviderConfig
184179 } ) ;
185180
186181 expect ( result . map ( x => x . label ) ) . toEqual ( [
@@ -201,8 +196,7 @@ describe("expressions", () => {
201196 it ( "multiple regions" , async ( ) => {
202197 const input = "run-name: test-${{ github }}-${{ | }}" ;
203198 const result = await complete ( ...getPositionFromCursor ( input ) , {
204- contextProviderConfig,
205- featureFlags : new FeatureFlags ( { allowCaseFunction : true } )
199+ contextProviderConfig
206200 } ) ;
207201
208202 expect ( result . map ( x => x . label ) ) . toEqual ( [
@@ -1181,8 +1175,7 @@ jobs:
11811175` ;
11821176
11831177 const result = await complete ( ...getPositionFromCursor ( input ) , {
1184- contextProviderConfig,
1185- featureFlags : new FeatureFlags ( { allowCaseFunction : true } )
1178+ contextProviderConfig
11861179 } ) ;
11871180 expect ( result . map ( x => x . label ) ) . toEqual ( [
11881181 "env" ,
0 commit comments