Skip to content

Commit

Permalink
simplify assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
jchris committed Sep 12, 2024
1 parent 9cc0289 commit a491c0b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/blockstore/connection-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export abstract class ConnectionBase implements Connection {
keybag: () => getKeyBag(loader.sthis, loader.ebOpts.keyBag),
loader,
});

this.loader.remoteMetaStore = remote;
this.loaded = this.loader.ready().then(async () => {
remote.load().then(async () => {
Expand Down
5 changes: 2 additions & 3 deletions tests/blockstore/store.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,8 @@ describe("DataStore with a saved car", function () {

it("should remove a car", async function () {
await store.remove(car.cid);
const error = (await store.load(car.cid).catch((e: Error) => e)) as NotFoundError;
expect(error.code).toMatch("ENOENT");
// matches(error.message, "ENOENT");
const { e: error } = (await store.load(car.cid).catch((e: Error) => ({ e }))) as { e: NotFoundError };
expect(error).toBeTruthy();
});
});

Expand Down

0 comments on commit a491c0b

Please sign in to comment.