williaster commented on a change in pull request #4909: [Explore] Adding Adhoc
Filters
URL:
https://github.com/apache/incubator-superset/pull/4909#discussion_r186484492
##########
File path: superset/assets/spec/javascripts/explore/AdhocFilter_spec.js
##########
@@ -0,0 +1,136 @@
+import { expect } from 'chai';
+import { describe, it } from 'mocha';
+
+import AdhocFilter, { EXPRESSION_TYPES, CLAUSES } from
'../../../src/explore/AdhocFilter';
+
+describe('AdhocFilter', () => {
+ it('sets filterOptionName in constructor', () => {
+ const adhocFilter = new AdhocFilter({
+ expressionType: EXPRESSION_TYPES.SIMPLE,
+ subject: 'value',
+ operator: '>',
+ comparator: '10',
+ clause: CLAUSES.WHERE,
+ });
+ expect(adhocFilter.filterOptionName.length).to.be.above(10);
Review comment:
is this because `value > 10` has a length of 10? you could maybe make it
more readable/obvious by doing `'value > 10'.length`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]