sqlmath 2026.4.31 → 2026.7.30

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/test.mjs CHANGED
@@ -39,6 +39,7 @@ import {
39
39
  assertOrThrow,
40
40
  childProcessSpawn2,
41
41
  ciBuildExt,
42
+ csvFromListofList,
42
43
  dbCloseAsync,
43
44
  dbExecAndReturnLastBlob,
44
45
  dbExecAndReturnLastRow,
@@ -61,6 +62,7 @@ import {
61
62
  listOrEmptyList,
62
63
  noop,
63
64
  sqlmathWebworkerInit,
65
+ uvthreadpoolsizeGet,
64
66
  version,
65
67
  waitAsync
66
68
  } from "./sqlmath.mjs";
@@ -168,7 +170,8 @@ SELECT
168
170
  );
169
171
  result = result.stdout.trim();
170
172
  assertJsonEqual(result, "abcd1234|abcd1234");
171
- }())
173
+ }()),
174
+ uvthreadpoolsizeGet()
172
175
  ]);
173
176
  });
174
177
  });
@@ -196,7 +199,7 @@ jstestDescribe((
196
199
  ), function test_dbBind() {
197
200
  jstestIt((
198
201
  "test db-bind handling-behavior"
199
- ), async function test_dbBind() {
202
+ ), async function () {
200
203
  let db;
201
204
  async function test_dbBind_exec(ii, valIn, valExpect) {
202
205
  await Promise.all([
@@ -3927,10 +3930,17 @@ SELECT
3927
3930
  ) USING (ii);
3928
3931
  `)
3929
3932
  });
3930
- valActual = (
3931
- "date saa sww spp"
3932
- + " ii linear_residual predict_sine\n"
3933
- + valActual.map(function (elem) {
3933
+ valActual = csvFromListofList({
3934
+ colList: [
3935
+ "date",
3936
+ "saa",
3937
+ "sww",
3938
+ "spp",
3939
+ "ii",
3940
+ "linear_residual",
3941
+ "predict_sine"
3942
+ ],
3943
+ rowList: valActual.map(function (elem) {
3934
3944
  return [
3935
3945
  elem.date,
3936
3946
  elem.saa,
@@ -3945,13 +3955,13 @@ SELECT
3945
3955
  ? num.toFixed(4)
3946
3956
  : num
3947
3957
  );
3948
- }).join(" ");
3949
- }).join("\n")
3950
- );
3951
- valActual = valActual.replace((/ /g), " null ");
3952
- valActual = valActual.replace((/ \n/g), "\n");
3953
- valActual = valActual.replace((/ /g), "\t");
3954
- valActual = valActual.trim() + "\n";
3958
+ });
3959
+ })
3960
+ });
3961
+ valActual = valActual.replace((/"/g), "");
3962
+ valActual = valActual.replace((/,,/g), ",null,");
3963
+ valActual = valActual.replace((/\r\n/g), "\n");
3964
+ valActual = valActual.replace((/,/g), "\t");
3955
3965
  await fsWriteFileUnlessTest(
3956
3966
  "test_data_sinefit.csv",
3957
3967
  valActual,