Skip to content

Commit

Permalink
Merge pull request #214 from fireproof-storage/car-test
Browse files Browse the repository at this point in the history
simplify assertion
  • Loading branch information
jchris authored Sep 12, 2024
2 parents 9cc0289 + a491c0b commit acbbd04
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 acbbd04

Please sign in to comment.