Skip to content
Snippets Groups Projects
Unverified Commit 4c7795d1 authored by Tom Robinson's avatar Tom Robinson
Browse files

Remove metrics from expressions tests [ci all]

parent 46e7b979
No related branches found
No related tags found
No related merge requests found
......@@ -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>;
......
......@@ -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)
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment