Skip to content

Commit

Permalink
Fixed formatting and added a comment explaining why we have a dialect…
Browse files Browse the repository at this point in the history
…-specific test here.

Signed-off-by: Jason Smart <jlsmart@meta.com>
  • Loading branch information
anagrd-ai committed Dec 29, 2024
1 parent 3ce2e24 commit 404f75c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/src/databases/snowflake/snowflake.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@

/* eslint-disable no-console */

import {RuntimeList} from '../../runtimes';
import {describeIfDatabaseAvailable} from '../../util';
import { RuntimeList } from '../../runtimes';

Check failure on line 10 in test/src/databases/snowflake/snowflake.spec.ts

View workflow job for this annotation

GitHub Actions / test-all (18.x)

Replace `·RuntimeList·` with `RuntimeList`
import { describeIfDatabaseAvailable } from '../../util';

Check failure on line 11 in test/src/databases/snowflake/snowflake.spec.ts

View workflow job for this annotation

GitHub Actions / test-all (18.x)

Replace `·describeIfDatabaseAvailable·` with `describeIfDatabaseAvailable`
import '../../util/db-jest-matchers';

const [describe, databases] = describeIfDatabaseAvailable(['snowflake']);
const runtimes = new RuntimeList(databases);

/**
Custom tests for Snowflake. The HyperLogLog algorithm is approximate, and different database
implementations can return slighlty different results. Thus we implement per-dialect unit tests
for these databases.
*/
describe.each(runtimes.runtimeList)(
'Snowflake dialect functions - %s',

Expand All @@ -27,7 +31,7 @@ describe.each(runtimes.runtimeList)(
} -> {
aggregate: code_count is hll_estimate(hll_combine(code_hll))
}
`).malloyResultMatches(runtime, {code_count: 19812});
`).malloyResultMatches(runtime, { code_count: 19812 });

Check failure on line 34 in test/src/databases/snowflake/snowflake.spec.ts

View workflow job for this annotation

GitHub Actions / test-all (18.x)

Replace `·code_count:·19812·` with `code_count:·19812`
});
}
);

Check failure on line 37 in test/src/databases/snowflake/snowflake.spec.ts

View workflow job for this annotation

GitHub Actions / test-all (18.x)

Insert `⏎`

Check failure on line 37 in test/src/databases/snowflake/snowflake.spec.ts

View workflow job for this annotation

GitHub Actions / test-all (18.x)

Newline required at end of file but not found

0 comments on commit 404f75c

Please sign in to comment.