Skip to content

Commit 78b228b

Browse files
committed
Fix
1 parent 397a9a3 commit 78b228b

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

api/app/lib/errors.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export class PostcodeNotFoundError extends PostcodesioHttpError {
8282

8383
constructor(terminatedPostcode: TerminatedPostcodeTuple | null = null) {
8484
super(404, "Postcode not found");
85+
Object.setPrototypeOf(this, PostcodeNotFoundError.prototype);
8586
this.terminatedPostcode = terminatedPostcode;
8687
}
8788

test/postcodes.integration.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ describe("Postcodes routes", function () {
1010
this.timeout(0);
1111
await helper.clearPostcodeDb();
1212
await helper.seedPostcodeDb();
13+
await helper.clearTerminatedPostcodesDb();
14+
await helper.seedTerminatedPostcodeDb();
1315
});
1416

1517
beforeEach(async () => {
@@ -216,7 +218,7 @@ describe("Postcodes routes", function () {
216218
done();
217219
});
218220
});
219-
it.only("returns terminated postcode data if postcode is terminated", function (done) {
221+
it("returns terminated postcode data if postcode is terminated", function (done) {
220222
// AB1 0AA is a terminated postcode in the seed data
221223
const terminatedPostcode = "AB1 0AA";
222224
const path = ["/postcodes/", encodeURI(terminatedPostcode)].join("");

0 commit comments

Comments
 (0)