angular-cn/aio/aio-builds-setup/dockerbuild/scripts-js/lib/verify-setup
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
..
constants.ts ci(docs-infra): change AIO preview server stuff to pull builds from CircleCI 2018-08-16 10:26:13 +01:00
delete-empty.d.ts ci(docs-infra): change AIO preview server stuff to pull builds from CircleCI 2018-08-16 10:26:13 +01:00
helper.ts refactor(docs-infra): take advantage of latest Jasmine features in preview server tests (#36837) 2020-05-05 17:46:46 -07:00
index.ts ci(aio): add initial implementation for aio-builds setup 2017-03-07 18:24:45 -08:00
jasmine-custom-matchers-types.d.ts ci(docs-infra): change AIO preview server stuff to pull builds from CircleCI 2018-08-16 10:26:13 +01:00
jasmine-custom-matchers.ts ci(docs-infra): add explicit return types to methods 2018-08-16 10:26:13 +01:00
mock-external-apis.ts fix(docs-infra): use correct parameters for paginated requests to GitHub (#25671) 2018-09-26 15:26:19 -07:00
nginx.e2e.ts refactor(docs-infra): take advantage of latest Jasmine features in preview server tests (#36837) 2020-05-05 17:46:46 -07:00
preview-server.e2e.ts refactor(docs-infra): take advantage of latest Jasmine features in preview server tests (#36837) 2020-05-05 17:46:46 -07:00
server-integration.e2e.ts ci(docs-infra): rename 'upload-server' to 'preview-server' 2018-08-16 10:26:13 +01:00
start-test-preview-server.ts ci(docs-infra): rename 'upload-server' to 'preview-server' 2018-08-16 10:26:13 +01:00
tar-stream.d.ts ci(docs-infra): change AIO preview server stuff to pull builds from CircleCI 2018-08-16 10:26:13 +01:00