@hot-updater/test-utils 1.2.0-rc.44 → 1.2.0-rc.45

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 +18 -6
  2. package/package.json +9 -9
package/dist/index.mjs CHANGED
@@ -777,6 +777,8 @@ const setupCoreAdminTestSuite = (options) => {
777
777
  expect((await adminJson(`/native-builds/${sandboxApp.id}/sibling`)).data).toEqual(sandboxIpa);
778
778
  expect((await adminJson(`/native-builds/${ipa.id}/sibling`)).data).toBeNull();
779
779
  expect((await adminJson(`/native-builds/${bundleRow("899").id}/sibling`)).data).toBeNull();
780
+ expect((await adminJson(`/native-builds/built-in/${ipa.min_bundle_id}`)).data).toEqual(ipa);
781
+ expect((await adminJson(`/native-builds/built-in/${bundleRow("899").id}`)).data).toBeNull();
780
782
  });
781
783
  it("requests, approves, renames, records, and removes iOS devices", async () => {
782
784
  const udid = namespace.replaceAll("-", "").padEnd(40, "0");
@@ -3880,6 +3882,16 @@ const READ_BUDGETS = [
3880
3882
  },
3881
3883
  check: (build) => expect(build).toMatchObject({ min_bundle_id: createBundleFixture("012").id })
3882
3884
  }),
3885
+ budget({
3886
+ api: "native build by its built-in bundle: 1 unique read",
3887
+ read: ({ core }) => core.findNativeBuildByBuiltInBundle(createBundleFixture("011").id),
3888
+ adapter: reads(0, 0, 1, 1),
3889
+ engine: {
3890
+ calls: 1,
3891
+ rows: 1
3892
+ },
3893
+ check: (build) => expect(build).toMatchObject({ id: createBundleFixture("8011").id })
3894
+ }),
3883
3895
  budget({
3884
3896
  api: "native build by scope: byScope descending, limit 1",
3885
3897
  read: ({ core }) => core.findNativeBuild(nativeBuildScope),
@@ -4471,22 +4483,22 @@ const READ_BUDGETS = [
4471
4483
  check: (device) => expect(device?.udid).toBe(BUDGET_PENDING_UDID)
4472
4484
  }),
4473
4485
  budget({
4474
- api: "iOS device account read, no claim yet: its row, then the rows that name one",
4486
+ api: "iOS device account read, no claim yet: its row, then the earliest registration",
4475
4487
  read: ({ core }) => core.findIosDeviceAccount(),
4476
- adapter: reads(1, 1, 1, 2),
4488
+ adapter: reads(1, 1, 1, 1),
4477
4489
  engine: {
4478
4490
  calls: 2,
4479
- rows: 2
4491
+ rows: 1
4480
4492
  },
4481
4493
  check: (account) => expect(account).toEqual({ issuerId: "issuer-a" })
4482
4494
  }),
4483
4495
  budget({
4484
- api: "iOS device account, first claim: its one row's read, the registry's rows once, and 1 write",
4496
+ api: "iOS device account, first claim: its one row's read, the earliest registration, and 1 write",
4485
4497
  read: ({ core }) => core.claimIosDeviceAccount("issuer-a"),
4486
- adapter: reads(1, 1, 1, 2),
4498
+ adapter: reads(1, 1, 1, 1),
4487
4499
  engine: {
4488
4500
  calls: 2,
4489
- rows: 2
4501
+ rows: 1
4490
4502
  },
4491
4503
  writes: 1,
4492
4504
  check: (claim) => expect(claim).toEqual({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hot-updater/test-utils",
3
- "version": "1.2.0-rc.44",
3
+ "version": "1.2.0-rc.45",
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.2.0-rc.44",
54
- "@hot-updater/protocol": "^1.2.0-rc.44",
55
- "@hot-updater/server": "^1.2.0-rc.44",
56
- "@hot-updater/plugin-core": "^1.2.0-rc.44"
53
+ "@hot-updater/plugin-insights": "^1.2.0-rc.45",
54
+ "@hot-updater/protocol": "^1.2.0-rc.45",
55
+ "@hot-updater/plugin-core": "^1.2.0-rc.45",
56
+ "@hot-updater/server": "^1.2.0-rc.45"
57
57
  },
58
58
  "peerDependenciesMeta": {
59
59
  "@electric-sql/pglite": {
@@ -84,10 +84,10 @@
84
84
  "typescript": "npm:@typescript/typescript6@6.0.2",
85
85
  "vitest": "4.1.4",
86
86
  "workspace-tools": "^0.42.3",
87
- "@hot-updater/plugin-insights": "1.2.0-rc.44",
88
- "@hot-updater/protocol": "1.2.0-rc.44",
89
- "@hot-updater/plugin-core": "1.2.0-rc.44",
90
- "@hot-updater/server": "1.2.0-rc.44"
87
+ "@hot-updater/plugin-insights": "1.2.0-rc.45",
88
+ "@hot-updater/protocol": "1.2.0-rc.45",
89
+ "@hot-updater/plugin-core": "1.2.0-rc.45",
90
+ "@hot-updater/server": "1.2.0-rc.45"
91
91
  },
92
92
  "inlinedDependencies": {
93
93
  "@clack/core": "1.4.3",