Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert API service, last fm importer and tests to typescript (#786)
* First cut at converting api-service.js to typescript * Convert APIService.test.js to TypeScript * Fix tests and add maximum stack depth * Fix test files * Fixed the tests in APIService.ts * Fix tests in Importer.test.ts * Tests for LastFMImporter fixed * All tests pass * Add package-lock.json and update entrypoint * Port LastFm importer to typescript (#787) * Port type.ts to type.d.ts * Fix ESLint errors * Fix LastFM importer icons (#788) * Fix icons * Disable no-unused-vars * Add tests for skipping listens if non 429 error codes Co-authored-by: Ishaan Shah <ishaanshah@users.noreply.github.com>
- Loading branch information
1 parent
5b1a66e
commit 0013ea3
Showing
26 changed files
with
783 additions
and
675 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/* Used in jest.config.js */ | ||
import * as Enzyme from 'enzyme'; | ||
import * as Adapter from 'enzyme-adapter-react-16'; | ||
|
||
Enzyme.configure({ adapter: new Adapter() }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export default class APIError extends Error { | ||
status?: string; | ||
|
||
response?: Response; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.