mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
Prettify the frontend code (#8648)
* Add Prettier global configs * Format js/jsx/ts/tsx/less files
This commit is contained in:
@@ -16,14 +16,17 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { emptyQueryResults, clearQueryEditors } from '../../../../src/SqlLab/utils/reduxStateToLocalStorageHelper';
|
||||
import {
|
||||
emptyQueryResults,
|
||||
clearQueryEditors,
|
||||
} from '../../../../src/SqlLab/utils/reduxStateToLocalStorageHelper';
|
||||
import { LOCALSTORAGE_MAX_QUERY_AGE_MS } from '../../../../src/SqlLab/constants';
|
||||
import { queries, defaultQueryEditor } from '../fixtures';
|
||||
|
||||
describe('reduxStateToLocalStorageHelper', () => {
|
||||
const queriesObj = {};
|
||||
beforeEach(() => {
|
||||
queries.forEach((q) => {
|
||||
queries.forEach(q => {
|
||||
queriesObj[q.id] = q;
|
||||
});
|
||||
});
|
||||
@@ -32,7 +35,9 @@ describe('reduxStateToLocalStorageHelper', () => {
|
||||
// make sure sample data contains old query
|
||||
const oldQuery = queries[0];
|
||||
const { id, startDttm } = oldQuery;
|
||||
expect(Date.now() - startDttm).toBeGreaterThan(LOCALSTORAGE_MAX_QUERY_AGE_MS);
|
||||
expect(Date.now() - startDttm).toBeGreaterThan(
|
||||
LOCALSTORAGE_MAX_QUERY_AGE_MS,
|
||||
);
|
||||
expect(Object.keys(oldQuery.results)).toContain('data');
|
||||
|
||||
const emptiedQuery = emptyQueryResults(queriesObj);
|
||||
|
||||
Reference in New Issue
Block a user