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
4c7795d1
Unverified
Commit
4c7795d1
authored
8 years ago
by
Tom Robinson
Browse files
Options
Downloads
Patches
Plain Diff
Remove metrics from expressions tests [ci all]
parent
46e7b979
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend/interfaces/underscore.js
+1
-0
1 addition, 0 deletions
frontend/interfaces/underscore.js
frontend/test/unit/lib/expressions/parser.spec.js
+4
-3
4 additions, 3 deletions
frontend/test/unit/lib/expressions/parser.spec.js
with
5 additions
and
3 deletions
frontend/interfaces/underscore.js
+
1
−
0
View file @
4c7795d1
...
...
@@ -28,6 +28,7 @@ declare module "underscore" {
declare
function
some
<
T
>
(
a
:
Array
<
T
>
,
pred
:
(
val
:
T
)
=>
boolean
):
boolean
;
declare
function
all
<
T
>
(
a
:
Array
<
T
>
,
pred
:
(
val
:
T
)
=>
boolean
):
boolean
;
declare
function
any
<
T
>
(
a
:
Array
<
T
>
,
pred
:
(
val
:
T
)
=>
boolean
):
boolean
;
declare
function
contains
<
T
>
(
a
:
Array
<
T
>
,
pred
:
(
val
:
T
)
=>
boolean
):
boolean
;
declare
function
initial
<
T
>
(
a
:
Array
<
T
>
,
n
?:
number
):
Array
<
T
>
;
declare
function
rest
<
T
>
(
a
:
Array
<
T
>
,
index
?:
number
):
Array
<
T
>
;
...
...
This diff is collapsed.
Click to expand it.
frontend/test/unit/lib/expressions/parser.spec.js
+
4
−
3
View file @
4c7795d1
...
...
@@ -100,7 +100,8 @@ describe("lib/expressions/parser", () => {
expect
(
cleanSuggestions
(
suggest
(
"
1 +
"
,
aggregationOpts
))).
toEqual
([
{
type
:
'
aggregations
'
,
text
:
'
Count
'
},
{
type
:
'
aggregations
'
,
text
:
'
Sum(
'
},
{
type
:
'
metrics
'
,
text
:
'
"foo bar"
'
},
// NOTE: metrics support currently disabled
// { type: 'metrics', text: '"foo bar"' },
{
type
:
'
other
'
,
text
:
'
(
'
},
]);
})
...
...
@@ -127,13 +128,13 @@ describe("lib/expressions/parser", () => {
describe
(
"
compile() in syntax mode
"
,
()
=>
{
it
(
"
should parse source without whitespace into a recoverable syntax tree
"
,
()
=>
{
const
source
=
"
1-Sum(A*2+
\"
Toucan Sam
\"
)/Count()
+
\"
foo bar
\"
"
;
const
source
=
"
1-Sum(A*2+
\"
Toucan Sam
\"
)/Count()
"
;
const
tree
=
parse
(
source
,
aggregationOpts
);
expect
(
serialize
(
tree
)).
toEqual
(
source
)
})
xit
(
"
should parse source with whitespace into a recoverable syntax tree
"
,
()
=>
{
// FIXME: not preserving whitespace
const
source
=
"
1 - Sum(A * 2 +
\"
Toucan Sam
\"
) / Count
+
\"
foo bar
\"
"
;
const
source
=
"
1 - Sum(A * 2 +
\"
Toucan Sam
\"
) / Count
"
;
const
tree
=
parse
(
source
,
aggregationOpts
);
expect
(
serialize
(
tree
)).
toEqual
(
source
)
})
...
...
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