Skip to content

Commit 6c0e63b

Browse files
committed
refactor(firestore): update pipeline expressions test to use arraySlice and remove unused expressions
1 parent a48e05d commit 6c0e63b

1 file changed

Lines changed: 1 addition & 15 deletions

File tree

packages/cloud_firestore/cloud_firestore/pipeline_example/integration_test/pipeline/pipeline_expressions_e2e.dart

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -821,26 +821,15 @@ void runPipelineExpressionsTests() {
821821
});
822822

823823
test(
824-
'addFields with new array pipeline expressions returns values',
824+
'addFields with arraySlice returns sliced array',
825825
() async {
826-
final value = Expression.variable('value');
827-
final index = Expression.variable('index');
828826
final snapshot = await firestore
829827
.pipeline()
830828
.collection('pipeline-e2e')
831829
.where(Expression.field('test').equalValue('expressions'))
832830
.where(Expression.field('score').equalValue(50))
833831
.addFields(
834832
Expression.field('arr').arraySlice(1, 2).as('arr_slice'),
835-
Expression.field('arr')
836-
.arrayFilter('value', value.greaterThanValue(3))
837-
.as('arr_filtered'),
838-
Expression.field('arr')
839-
.arrayTransform('value', value.multiplyValue(10))
840-
.as('arr_transformed'),
841-
Expression.field('arr')
842-
.arrayTransformWithIndex('value', 'index', value.add(index))
843-
.as('arr_with_index'),
844833
)
845834
.limit(1)
846835
.execute();
@@ -849,9 +838,6 @@ void runPipelineExpressionsTests() {
849838
expectResultsData(snapshot, [
850839
{
851840
'arr_slice': [4, 6],
852-
'arr_filtered': [4, 6],
853-
'arr_transformed': [20, 40, 60],
854-
'arr_with_index': [2, 5, 8],
855841
},
856842
]);
857843
},

0 commit comments

Comments
 (0)