How to use the jasmine-marbles.time function in jasmine-marbles

To help you get started, we’ve selected a few jasmine-marbles examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github GetTerminus / ngx-tools / ngx-tools / utilities / src / http-retryer / http-retryer.spec.ts View on Github external
test(`should handle a delay with a specific retry date time`, () => {
      const waitTime = time(`${'-'.repeat(100)  }|`);
      const emissionTime = new Date(getTestScheduler().now() + waitTime);

      const retryErrorWithSpecificDelay = new HttpErrorResponse({
        status: 429,
        headers: new HttpHeaders({ 'Retry-After': emissionTime.toString() }),
      });

      getTestScheduler().maxFrames = 1500;

      (expect(
        errorAfter(3, retryErrorWithSpecificDelay, 1).pipe(
          httpRetryer({ scheduler: getTestScheduler() }),
        ),
      ) as any).toBeObservable(
        // Note the '- 2' account for the time it takes to get to the first error
        cold(`ab${  '-'.repeat(100 - 2)  }abcd`, {

jasmine-marbles

Marble testing helpers for RxJS and Jasmine

MIT
Latest version published 2 years ago

Package Health Score

59 / 100
Full package analysis