@hot-updater/test-utils 1.0.0-rc.37 → 1.0.0-rc.39

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.
Files changed (2) hide show
  1. package/dist/index.mjs +9 -5
  2. package/package.json +10 -10
package/dist/index.mjs CHANGED
@@ -4767,7 +4767,7 @@ const registerInsightsModelTests = (state) => {
4767
4767
  failedLaunches: 0
4768
4768
  }]);
4769
4769
  });
4770
- it("counts each launch and download once, so a bundle's launches match its release and its downloads cover launches and crashes", async () => {
4770
+ it("counts each launch and download once, so a bundle's launch and download series match its release, and its downloads cover launches and crashes", async () => {
4771
4771
  const model = state.getDatabase();
4772
4772
  const day = 864e5;
4773
4773
  const releaseA = "00000000-0000-7000-8000-000000009b01";
@@ -4821,7 +4821,11 @@ const registerInsightsModelTests = (state) => {
4821
4821
  from_bundle_id: bundleB,
4822
4822
  to_release_id: releaseA,
4823
4823
  to_bundle_id: bundleA
4824
- })
4824
+ }),
4825
+ launch("i6", 1e3, bundleA),
4826
+ download("i6", 2e3),
4827
+ download("i6", 2500),
4828
+ apply("i6", 3e3)
4825
4829
  ];
4826
4830
  for (const row of rows) await record(model, row);
4827
4831
  const scope = {
@@ -4841,8 +4845,8 @@ const registerInsightsModelTests = (state) => {
4841
4845
  ...scope
4842
4846
  }] })).data;
4843
4847
  expect(metrics).toEqual({
4844
- downloads: 5,
4845
- applies: 4,
4848
+ downloads: 6,
4849
+ applies: 5,
4846
4850
  failedLaunches: 1
4847
4851
  });
4848
4852
  await expectInsightsIndex(async () => await count({
@@ -4863,7 +4867,7 @@ const registerInsightsModelTests = (state) => {
4863
4867
  ...scope,
4864
4868
  type: "UPDATE_DOWNLOADED",
4865
4869
  toBundleId: bundleB
4866
- }), metrics.downloads - implied);
4870
+ }), metrics.downloads);
4867
4871
  expect(implied).toBe(2);
4868
4872
  expect(metrics.downloads).toBeGreaterThanOrEqual(metrics.applies + metrics.failedLaunches);
4869
4873
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hot-updater/test-utils",
3
- "version": "1.0.0-rc.37",
3
+ "version": "1.0.0-rc.39",
4
4
  "type": "module",
5
5
  "description": "Test utilities for Hot Updater packages",
6
6
  "sideEffects": false,
@@ -50,10 +50,10 @@
50
50
  "mysql2": "*",
51
51
  "pg": "*",
52
52
  "vitest": "^4.0.0",
53
- "@hot-updater/plugin-insights": "^1.0.0-rc.37",
54
- "@hot-updater/plugin-core": "^1.0.0-rc.37",
55
- "@hot-updater/protocol": "^1.0.0-rc.37",
56
- "@hot-updater/server": "^1.0.0-rc.37"
53
+ "@hot-updater/plugin-insights": "^1.0.0-rc.39",
54
+ "@hot-updater/protocol": "^1.0.0-rc.39",
55
+ "@hot-updater/plugin-core": "^1.0.0-rc.39",
56
+ "@hot-updater/server": "^1.0.0-rc.39"
57
57
  },
58
58
  "peerDependenciesMeta": {
59
59
  "@electric-sql/pglite": {
@@ -83,11 +83,11 @@
83
83
  "typescript": "npm:@typescript/typescript6@6.0.2",
84
84
  "vitest": "4.1.4",
85
85
  "workspace-tools": "^0.41.7",
86
- "@hot-updater/plugin-insights": "1.0.0-rc.37",
87
- "@hot-updater/protocol": "1.0.0-rc.37",
88
- "@hot-updater/js": "1.0.0-rc.37",
89
- "@hot-updater/plugin-core": "1.0.0-rc.37",
90
- "@hot-updater/server": "1.0.0-rc.37"
86
+ "@hot-updater/plugin-insights": "1.0.0-rc.39",
87
+ "@hot-updater/js": "1.0.0-rc.39",
88
+ "@hot-updater/plugin-core": "1.0.0-rc.39",
89
+ "@hot-updater/server": "1.0.0-rc.39",
90
+ "@hot-updater/protocol": "1.0.0-rc.39"
91
91
  },
92
92
  "inlinedDependencies": {
93
93
  "@nodelib/fs.scandir": "2.1.5",