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

fix: BigQueryTimestamp should keep accepting floats #1339

Merged
merged 5 commits into from
Mar 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: lint issues
  • Loading branch information
alvarowolfx committed Mar 11, 2024
commit 37879fdfabe2390c127ff758d39c6e2b46a36088
4 changes: 2 additions & 2 deletions test/bigquery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -887,10 +887,10 @@ describe('BigQuery', () => {
const d = new Date();
const f = d.valueOf() / 1000; // float seconds
let timestamp = bq.timestamp(f);
assert.strictEqual(timestamp.value, d.toJSON());
assert.strictEqual(timestamp.value, d.toJSON());

timestamp = bq.timestamp(f.toString());
assert.strictEqual(timestamp.value, d.toJSON());
assert.strictEqual(timestamp.value, d.toJSON());
});

it('should accept a number in microseconds', () => {
Expand Down