Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correct query parameter in AJAX call
The correct query parameter to get a file from GitHub API is `ref` but we've been using `branch` this whole time. This has worked so far because all the tests have been performed on a file (`https://github.com/huy-nguyen/squarify/blob/d7074c2/.babelrc`) that has only one version in git history. Providing a `branch` parameter instead of a `ref` parameter causes GitHub to assume no `ref` has been specified and as such to return the latest version of that file on the `master` branch, which coincidentally is the correct content of the tested file (which ever only has one version). This commit fixes that error and also updates all test files so that they don't use the special case of files with only one version in git history.
- Loading branch information
Showing with 161 additions and 82 deletions.
- +6 −5 src/__fixtures__/no-ellipsis-comments/expected.md
- +1 −1 src/__fixtures__/no-ellipsis-comments/input.md
- +71 −32 src/__fixtures__/simple-example/expected.md
- +3 −3 src/__fixtures__/simple-example/input.md
- +71 −32 src/__fixtures__/with-cache/expected.md
- +3 −3 src/__fixtures__/with-cache/input.md
- +4 −4 src/__tests__/fetchGithubContent.js
- +1 −1 src/__tests__/fetchGithubContentFail.js
- +1 −1 src/fetchGithubContent.ts