Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update @types/sinon@9 and remove FakeTimers workaround #655

Closed
zamnuts opened this issue Mar 23, 2020 · 1 comment
Closed

update @types/sinon@9 and remove FakeTimers workaround #655

zamnuts opened this issue Mar 23, 2020 · 1 comment
Assignees
Labels
api: bigquery Issues related to the googleapis/nodejs-bigquery API. type: process A process-related concern. May include testing, release, or the like.

Comments

@zamnuts
Copy link
Contributor

zamnuts commented Mar 23, 2020

Tests for Table as part of PR #589 use the sinon fake timers API async methods. At the time of this writing (and #589) the async methods, i.e. runAllAsync and tickAsync, are missing from the TS definitions. A workaround is currently in place that defines the SinonFakeTimersShim interface:

    interface SinonFakeTimersShim extends sinon.SinonFakeTimers {
      runAllAsync(): Promise<number>;
      tickAsync(ms: number | string): Promise<number>;
    }

The PR DefinitelyTyped/DefinitelyTyped#43148 was introduced to resolve this issue, and once it lands:

  1. update @types/sinon to version 9 (will be a major version bump up from 7)
  2. remove the temporary workaround interface for SinonFakeTimersShim in favor of SinonFakeTimers
@zamnuts zamnuts added the type: process A process-related concern. May include testing, release, or the like. label Mar 23, 2020
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/nodejs-bigquery API. label Mar 23, 2020
zamnuts added a commit that referenced this issue Apr 13, 2020
* fix(table): add retries for insert partial failures

* refactoring

* moar refactors

* fix(table): working test cases for insert partial failure and retries (#589)

* chore(table): explicit insert/create recursion, elaborated on method signatures/types

* chore(table): rename insert option maxAttempts to partialRetries, allow retry of 0, do not allow negative retries #589

* test(table): remove sinon fake timers hack now that v9 is available #655

Co-authored-by: Andrew Zammit <zammit.andrew@gmail.com>
@zamnuts
Copy link
Contributor Author

zamnuts commented Apr 13, 2020

Resolved in PR #589

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/nodejs-bigquery API. type: process A process-related concern. May include testing, release, or the like.
Projects
None yet
Development

No branches or pull requests

1 participant