This is an automated email from the ASF dual-hosted git repository.
yongjiezhao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 8e46ae5c6a chore: superset-ui/core code coverage (#20304)
8e46ae5c6a is described below
commit 8e46ae5c6aecaf82efab154e03f527dc469fd3d2
Author: Yongjie Zhao <[email protected]>
AuthorDate: Wed Jun 8 16:54:30 2022 +0800
chore: superset-ui/core code coverage (#20304)
---
.../test/query/buildQueryContext.test.ts | 25 ++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git
a/superset-frontend/packages/superset-ui-core/test/query/buildQueryContext.test.ts
b/superset-frontend/packages/superset-ui-core/test/query/buildQueryContext.test.ts
index be94a877b2..366feeff7a 100644
---
a/superset-frontend/packages/superset-ui-core/test/query/buildQueryContext.test.ts
+++
b/superset-frontend/packages/superset-ui-core/test/query/buildQueryContext.test.ts
@@ -108,4 +108,29 @@ describe('buildQueryContext', () => {
]),
);
});
+ it('should remove undefined value in post_processing', () => {
+ const queryContext = buildQueryContext(
+ {
+ datasource: '5__table',
+ viz_type: 'table',
+ },
+ () => [
+ {
+ post_processing: [
+ undefined,
+ undefined,
+ {
+ operation: 'flatten',
+ },
+ undefined,
+ ],
+ },
+ ],
+ );
+ expect(queryContext.queries[0].post_processing).toEqual([
+ {
+ operation: 'flatten',
+ },
+ ]);
+ });
});