You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/11/13 18:45:51 UTC
[GitHub] kristw commented on a change in pull request #6377: [SIP-5]
QueryBuilder in the client for groupby
kristw commented on a change in pull request #6377: [SIP-5] QueryBuilder in the client for groupby
URL: https://github.com/apache/incubator-superset/pull/6377#discussion_r233174188
##########
File path: superset/assets/src/query/queryContextBuilder.spec.ts
##########
@@ -0,0 +1,24 @@
+import * as datasourceBuilder from './datasourceBuilder';
+import build from './queryContextBuilder';
+import * as queryObjectBuilder from './queryObjectBuilder';
+
+describe('queryContextBuilder', () => {
+ const formData = {
+ datasource: '5__table',
+ groupby: ['foo'],
+ };
+ const datasourceBuilderSpy = jest.spyOn(datasourceBuilder, 'default');
+ const queryObjectBuilderSpy = jest.spyOn(queryObjectBuilder, 'default');
+
+ beforeEach(() => {
+ build(formData);
+ });
+
+ it('should call datasourceBuilder to build datasource', () => {
+ expect(datasourceBuilderSpy).toHaveBeenCalled();
Review comment:
I have question about where to put test files. I like having them side-by-side but both `incubator-superset` and `superset-ui` put test files in separate folders. Perhaps this PR can follow the same structure to put tests under `test`?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org