Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
c5c6f6f9
Commit
c5c6f6f9
authored
2 years ago
by
Callum Herries
Browse files
Options
Downloads
Patches
Plain Diff
Fix count() fe unit test
parent
69491ddc
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/test/metabase/lib/expressions/__support__/shared.js
+5
-5
5 additions, 5 deletions
frontend/test/metabase/lib/expressions/__support__/shared.js
with
5 additions
and
5 deletions
frontend/test/metabase/lib/expressions/__support__/shared.js
+
5
−
5
View file @
c5c6f6f9
...
...
@@ -73,16 +73,16 @@ const expression = [
];
const
aggregation
=
[
[
"
Count
"
,
[
"
count
"
],
"
aggregation with no arguments
"
],
[
"
Count
()
"
,
[
"
count
()
"
],
"
aggregation with no arguments
"
],
[
"
Sum([Total])
"
,
[
"
sum
"
,
total
],
"
aggregation with one argument
"
],
[
"
1 - Count
"
,
[
"
-
"
,
1
,
[
"
count
"
]],
"
aggregation with math outside
"
],
[
"
1 - Count
()
"
,
[
"
-
"
,
1
,
[
"
count
"
]],
"
aggregation with math outside
"
],
[
"
Sum([Total] * 2)
"
,
[
"
sum
"
,
[
"
*
"
,
total
,
2
]],
"
aggregation with math inside
"
,
],
[
"
1 - Sum([Total] * 2) / Count
"
,
"
1 - Sum([Total] * 2) / Count
()
"
,
[
"
-
"
,
1
,
[
"
/
"
,
[
"
sum
"
,
[
"
*
"
,
total
,
2
]],
[
"
count
"
]]],
"
aggregation with math inside and outside
"
,
],
...
...
@@ -117,14 +117,14 @@ const aggregation = [
// should not compile:
[
"
Count([Total])
"
,
undefined
,
"
invalid count arguments
"
],
[
"
SumIf([Total] > 50, [Total])
"
,
undefined
,
"
invalid sum-where arguments
"
],
[
"
Count + Share((
"
,
undefined
,
"
invalid share
"
],
[
"
Count
()
+ Share((
"
,
undefined
,
"
invalid share
"
],
];
// Skipped for now: temporary, known regression
/* eslint-disable no-unused-vars */
const
nested_aggregation
=
[
// should not compile:
[
"
Sum(Count)
"
,
undefined
,
"
aggregation nested inside another aggregation
"
],
[
"
Sum(Count
()
)
"
,
undefined
,
"
aggregation nested inside another aggregation
"
],
];
/* eslint-enable no-unused-vars */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment