Skip to content

Commit

Permalink
Combined two similarly-named test files, updated release notes (#76)
Browse files Browse the repository at this point in the history
* internal: Combined two similarly-named test files
* internal: Update CHANGELOG
  • Loading branch information
soboko authored and zhaoyongjie committed Nov 26, 2021
1 parent 28a1124 commit 56f8af8
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 44 deletions.
22 changes: 22 additions & 0 deletions superset-frontend/temporary_superset_ui/superset-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# @superset-ui : Change Log

## v0.8.0

### Features

* Add SuperChart and convert to TypeScript
* Allow metrics arrays in form data
* Moved query module from `incubator-superset` into `superset-ui`
* Add `reactify` function from `incubator-superset`

### 🐞 Bug fixes

* Handle `BigNumber` conversions to/from JSON without loss of precision

### 🛠️ Internal

* Use DefinitelyTyped's `fetch-mock` type def
* Improved type def for `json-bigint`
* Migrated `@superset-ui/chart` to TypeScript
* Migrated `@superset-ui/color` to TypeScript
* Migrated `@superset-ui/core` to TypeScript
* Made `connection` and `color` packages peer dependencies

## v0.7.2

### ✨ Features
Expand Down
7 changes: 4 additions & 3 deletions superset-frontend/temporary_superset_ui/superset-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ across all packages using the syntax `yarn run test` (or `yarn run test:watch` f

### Publishing

```
yarn run release
```
**Prerequisite:** You'll need an [npmjs.com](https://npmjs.com) account that is part of the `superset-ui` organization.

1. Make sure you're logged in to NPM from your shell. Run `npm login` if necessary.
2. To make the release, run `yarn run release` and follow the prompts.

### License

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ describe('parseResponse()', () => {
const mockGetUrl = '/mock/get/url';
const mockPostUrl = '/mock/post/url';
const mockErrorUrl = '/mock/error/url';
const mockNoParseUrl = '/mock/noparse/url';

const mockGetPayload = { get: 'payload' };
const mockPostPayload = { post: 'payload' };
Expand All @@ -24,6 +25,7 @@ describe('parseResponse()', () => {
fetchMock.get(mockGetUrl, mockGetPayload);
fetchMock.post(mockPostUrl, mockPostPayload);
fetchMock.get(mockErrorUrl, () => Promise.reject(mockErrorPayload));
fetchMock.get(mockNoParseUrl, new Response('test response'));

afterEach(fetchMock.reset);

Expand Down Expand Up @@ -86,13 +88,16 @@ describe('parseResponse()', () => {
});
});

it('throws if parseMethod is not null|json|text', () => {
const apiPromise = callApi({ url: mockNoParseUrl, method: 'GET' });

// @ts-ignore - 'something-else' is *intentionally* an invalid type
expect(() => parseResponse(apiPromise, 'something-else')).toThrow();
});

it('resolves to the unmodified `Response` object if `parseMethod=null`', () => {
expect.assertions(2);

const mockNoParseUrl = '/mock/noparse/url';
const mockResponse = new Response('test response');
fetchMock.get(mockNoParseUrl, mockResponse);

const apiPromise = callApi({ url: mockNoParseUrl, method: 'GET' });

return parseResponse(apiPromise, null).then((clientResponse: SupersetClientResponse) => {
Expand Down

0 comments on commit 56f8af8

Please sign in to comment.