George Kalpakas
1b8752e595
refactor(docs-infra): take advantage of latest Jasmine features in preview server tests ( #36837 )
...
This commit updates the preview server tests to take advantage of
features supported in the latest version of Jasmine that were not
supported when the rests were first written.
Changes include:
- Use [async/await] in tests.
- Use the new [toBeInstanceOf()] and [toHaveBeenCalledBefore()] matchers.
- Use the new [toBeResolved()] and [toBeRejected()] async matchers (and
their variants).
- Use the new [withArgs()] method of `Spy` to simplify "trained"
responses.
- Use the new [resolveTo()]/[rejectWith()] methods of `SpyStrategy` (and
their variants) to simplify promise-based spies.
- Implement custom async matchers (via [addAsyncMatchers()]) to simplify
certain tests.
[addAsyncMatchers()]: https://jasmine.github.io/api/3.5/jasmine.html#.addAsyncMatchers
[async/await]: https://jasmine.github.io/tutorials/async
[rejectWith()]: https://jasmine.github.io/api/3.5/SpyStrategy.html#rejectWith
[resolveTo()]: https://jasmine.github.io/api/3.5/SpyStrategy.html#resolveTo
[toBeInstanceOf()]: https://jasmine.github.io/api/3.5/matchers.html#toBeInstanceOf
[toBeRejected()]: https://jasmine.github.io/api/3.5/async-matchers.html#toBeRejected
[toBeResolved()]: https://jasmine.github.io/api/3.5/async-matchers.html#toBeResolved
[toHaveBeenCalledBefore()]: https://jasmine.github.io/api/3.5/matchers.html#toHaveBeenCalledBefore
[withArgs()]: https://jasmine.github.io/api/3.5/Spy.html#withArgs
PR Close #36837
2020-05-05 17:46:46 -07:00
George Kalpakas
eef01160f4
build(docs-infra): upgrade all JS dependencies to latest versions ( #36837 )
...
This commit upgrades all dependencies in `scripts-js/` to latest
versions and also includes all necessary code changes to ensure the
tests are passing with the new dependency versions.
PR Close #36837
2020-05-05 17:46:45 -07:00
George Kalpakas
a01acec7fe
fix(docs-infra): use correct parameters for paginated requests to GitHub ( #25671 )
...
As it turns out, in GitHub API paginated requests, page numbering is
1-based. (https://developer.github.com/v3/#pagination )
Starting at page 0 (which returns the first page), results in making the
same request twice and logging incorrect numbers (since the first 100
items are listed twice).
PR Close #25671
2018-09-26 15:26:19 -07:00
Pete Bacon Darwin
cc6f36a9d7
ci(docs-infra): change AIO preview server stuff to pull builds from CircleCI
...
Previously, Travis pushed the build artitfacts to the preview server.
This required us to use JWT to secure the POST request from Travis, to
ensure we couldn't receive malicious builds.
JWT has been deprecated and we are moving our builds to CircleCI.
This commit rewrites the TypeScript part of the preview server that
handles converting build artifact into hosted previews of the docs.
2018-08-16 10:26:13 +01:00
George Kalpakas
620407720c
build(aio): upgrade all preview server dependencies
2017-09-25 12:01:22 -07:00
Georgios Kalpakas
1b13bdea4b
build(aio): upgrade preview server dependencies
2017-06-23 11:54:20 -07:00
Georgios Kalpakas
060d02eb82
fix(aio): remove unnecessary `repoSlug` parameter from `GithubApi`
2017-03-07 18:24:45 -08:00
Georgios Kalpakas
951e653b0c
feat(aio): implement `GithubApi.getPaginated()`
2017-03-07 18:24:45 -08:00
Georgios Kalpakas
37348989f0
feat(aio): make `githubToken` mandatory for `GithubApi`
2017-03-07 18:24:45 -08:00
Georgios Kalpakas
c5644e5a0d
refactor(aio): add `assertNotMissingOrEmpty()` helper
2017-03-07 18:24:45 -08:00
Georgios Kalpakas
8a8d4fe24f
test(aio): fix typos (repoSlag --> repoSlug)
2017-03-07 18:24:45 -08:00
Georgios Kalpakas
115164033b
ci(aio): add initial implementation for aio-builds setup
2017-03-07 18:24:45 -08:00