@malloydata/malloy-tests 0.0.439 → 0.0.440
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -20,28 +20,28 @@
|
|
|
20
20
|
"malloyc": "ts-node ../scripts/malloy-to-json"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@malloydata/db-bigquery": "0.0.
|
|
24
|
-
"@malloydata/db-duckdb": "0.0.
|
|
25
|
-
"@malloydata/db-postgres": "0.0.
|
|
26
|
-
"@malloydata/db-snowflake": "0.0.
|
|
27
|
-
"@malloydata/db-sqlserver": "0.0.
|
|
28
|
-
"@malloydata/db-trino": "0.0.
|
|
29
|
-
"@malloydata/malloy": "0.0.
|
|
30
|
-
"@malloydata/malloy-tag": "0.0.
|
|
31
|
-
"@malloydata/render": "0.0.
|
|
32
|
-
"@malloydata/render-validator": "0.0.
|
|
23
|
+
"@malloydata/db-bigquery": "0.0.440",
|
|
24
|
+
"@malloydata/db-duckdb": "0.0.440",
|
|
25
|
+
"@malloydata/db-postgres": "0.0.440",
|
|
26
|
+
"@malloydata/db-snowflake": "0.0.440",
|
|
27
|
+
"@malloydata/db-sqlserver": "0.0.440",
|
|
28
|
+
"@malloydata/db-trino": "0.0.440",
|
|
29
|
+
"@malloydata/malloy": "0.0.440",
|
|
30
|
+
"@malloydata/malloy-tag": "0.0.440",
|
|
31
|
+
"@malloydata/render": "0.0.440",
|
|
32
|
+
"@malloydata/render-validator": "0.0.440",
|
|
33
33
|
"events": "^3.3.0",
|
|
34
34
|
"jsdom": "^22.1.0",
|
|
35
35
|
"luxon": "^3.7.2",
|
|
36
36
|
"madge": "^8.0.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@jest/globals": "^
|
|
39
|
+
"@jest/globals": "^30.5.2",
|
|
40
40
|
"@types/jsdom": "^21.1.1",
|
|
41
|
-
"@types/luxon": "^3.7.
|
|
41
|
+
"@types/luxon": "^3.7.6"
|
|
42
42
|
},
|
|
43
43
|
"overrides": {
|
|
44
44
|
"typescript": "^6.0.3"
|
|
45
45
|
},
|
|
46
|
-
"version": "0.0.
|
|
46
|
+
"version": "0.0.440"
|
|
47
47
|
}
|
|
@@ -75,7 +75,7 @@ expressionModels.forEach((x, databaseName) => {
|
|
|
75
75
|
const result = await run();
|
|
76
76
|
expect(result.data.path(0, 'f').value).toBe(expectedSuccess);
|
|
77
77
|
} else {
|
|
78
|
-
expect(run).rejects.
|
|
78
|
+
expect(run).rejects.toThrow(expected.error);
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
|
|
@@ -363,6 +363,23 @@ describe.each(runtimes.runtimeList)('%s date and time', (dbName, runtime) => {
|
|
|
363
363
|
lt_digits: 'yes',
|
|
364
364
|
});
|
|
365
365
|
});
|
|
366
|
+
|
|
367
|
+
test.when(timestamptz)('measure to and from a timestamp', async () => {
|
|
368
|
+
await expect(`
|
|
369
|
+
run: tzdata -> {
|
|
370
|
+
select:
|
|
371
|
+
to_tstz is minutes(same_digits to tstz)
|
|
372
|
+
from_tstz is minutes(tstz to same_digits)
|
|
373
|
+
to_zoned is minutes(same_digits to @2020-01-30 20:00:00[America/Mexico_City])
|
|
374
|
+
from_zoned is minutes(@2020-01-30 20:00:00[America/Mexico_City] to same_digits)
|
|
375
|
+
}
|
|
376
|
+
`).toMatchResult(tzModel(), {
|
|
377
|
+
to_tstz: 360,
|
|
378
|
+
from_tstz: -360,
|
|
379
|
+
to_zoned: 360,
|
|
380
|
+
from_zoned: -360,
|
|
381
|
+
});
|
|
382
|
+
});
|
|
366
383
|
});
|
|
367
384
|
|
|
368
385
|
describe('date truncation', () => {
|
|
@@ -1012,6 +1029,17 @@ describe.each(runtimes.runtimeList)('%s: query tz', (dbName, runtime) => {
|
|
|
1012
1029
|
back: 'yes',
|
|
1013
1030
|
});
|
|
1014
1031
|
});
|
|
1032
|
+
|
|
1033
|
+
test.when(timestamptz)('a range starting at it', async () => {
|
|
1034
|
+
await expect(`
|
|
1035
|
+
run: tzdata -> {
|
|
1036
|
+
timezone: '${zone}'
|
|
1037
|
+
select:
|
|
1038
|
+
before_end is pick 'in' when same_instant + 23 hours ? tstz for 1 day else 'out'
|
|
1039
|
+
after_end is pick 'in' when same_instant + 25 hours ? tstz for 1 day else 'out'
|
|
1040
|
+
}
|
|
1041
|
+
`).toMatchResult(tzModel(), {before_end: 'in', after_end: 'out'});
|
|
1042
|
+
});
|
|
1015
1043
|
});
|
|
1016
1044
|
|
|
1017
1045
|
// Test for timezone rendering issue with nested queries
|