@malloydata/malloy-tests 0.0.218 → 0.0.219-dev241203175820
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
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@jest/globals": "^29.4.3",
|
|
24
|
-
"@malloydata/db-bigquery": "^0.0.
|
|
25
|
-
"@malloydata/db-duckdb": "^0.0.
|
|
26
|
-
"@malloydata/db-postgres": "^0.0.
|
|
27
|
-
"@malloydata/db-snowflake": "^0.0.
|
|
28
|
-
"@malloydata/db-trino": "^0.0.
|
|
29
|
-
"@malloydata/malloy": "^0.0.
|
|
30
|
-
"@malloydata/render": "^0.0.
|
|
24
|
+
"@malloydata/db-bigquery": "^0.0.219-dev241203175820",
|
|
25
|
+
"@malloydata/db-duckdb": "^0.0.219-dev241203175820",
|
|
26
|
+
"@malloydata/db-postgres": "^0.0.219-dev241203175820",
|
|
27
|
+
"@malloydata/db-snowflake": "^0.0.219-dev241203175820",
|
|
28
|
+
"@malloydata/db-trino": "^0.0.219-dev241203175820",
|
|
29
|
+
"@malloydata/malloy": "^0.0.219-dev241203175820",
|
|
30
|
+
"@malloydata/render": "^0.0.219-dev241203175820",
|
|
31
31
|
"events": "^3.3.0",
|
|
32
32
|
"jsdom": "^22.1.0",
|
|
33
33
|
"luxon": "^2.4.0",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"@types/jsdom": "^21.1.1",
|
|
38
38
|
"@types/luxon": "^2.4.0"
|
|
39
39
|
},
|
|
40
|
-
"version": "0.0.
|
|
40
|
+
"version": "0.0.219-dev241203175820"
|
|
41
41
|
}
|
|
@@ -272,6 +272,35 @@ describe.each(runtimes.runtimeList)(
|
|
|
272
272
|
{x: 1, pctrnk: 0},
|
|
273
273
|
]);
|
|
274
274
|
});
|
|
275
|
+
|
|
276
|
+
it(`runs the url_extract functions - ${databaseName}`, async () => {
|
|
277
|
+
await expect(`
|
|
278
|
+
run: ${databaseName}.sql(
|
|
279
|
+
"""
|
|
280
|
+
SELECT 'http://websitetesthost.com:80/path_comp/my_test?first_param=val_one&second_param=2#example_frag' as test_url
|
|
281
|
+
"""
|
|
282
|
+
) -> {
|
|
283
|
+
select:
|
|
284
|
+
fragment is url_extract_fragment(test_url)
|
|
285
|
+
host is url_extract_host(test_url)
|
|
286
|
+
param_one is url_extract_parameter(test_url, 'first_param')
|
|
287
|
+
param_two is url_extract_parameter(test_url, 'second_param')
|
|
288
|
+
path is url_extract_path(test_url)
|
|
289
|
+
port is url_extract_port(test_url)
|
|
290
|
+
protocol is url_extract_protocol(test_url)
|
|
291
|
+
query is url_extract_query(test_url)
|
|
292
|
+
}
|
|
293
|
+
`).malloyResultMatches(runtime, {
|
|
294
|
+
fragment: 'example_frag',
|
|
295
|
+
host: 'websitetesthost.com',
|
|
296
|
+
param_one: 'val_one',
|
|
297
|
+
param_two: '2',
|
|
298
|
+
path: '/path_comp/my_test',
|
|
299
|
+
port: 80,
|
|
300
|
+
protocol: 'http',
|
|
301
|
+
query: 'first_param=val_one&second_param=2',
|
|
302
|
+
});
|
|
303
|
+
});
|
|
275
304
|
}
|
|
276
305
|
);
|
|
277
306
|
|