Skip to content

Commit

Permalink
Update test for new seed dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
cblanc committed Sep 30, 2024
1 parent 11f761a commit f505fd2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
3 changes: 1 addition & 2 deletions test/helper/type_checking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ export const isRawPostcodeObject = (

const postcodeForeignColumns = [
"parliamentary_constituency",
"parliamentary_constituency_2024",
"admin_district",
"parish",
"admin_county",
Expand All @@ -187,7 +186,7 @@ export const isRawPostcodeObjectWithFC = (
isRawPostcodeObject(
o,
postcodeForeignColumns.concat(additionalAttr || []),
blacklist
blacklist || []
);
};

Expand Down
13 changes: 4 additions & 9 deletions test/postcode.regression.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,8 @@ describe("Postcode data regression testing", function () {
ccg_id: "S03000012",
ced: null,
ced_id: "S99999999",
constituency_id: "S14000002",
constituency_2024_id: null,
constituency_id: "S14000061",
parliamentary_constituency: "Aberdeen South",
parliamentary_constituency_2024: null,
admin_district: "Aberdeen City",
parish: null,
admin_county: null,
Expand All @@ -68,6 +66,7 @@ describe("Postcode data regression testing", function () {
it("returns correct data for SE1P5ZZ", async () => {
const result = await Postcode.find("SE1P5ZZ");
if (result === null) throw new Error("Postcode not found");
console.log(result);
assert.deepEqual(
{
id: result.id,
Expand Down Expand Up @@ -98,10 +97,8 @@ describe("Postcode data regression testing", function () {
ccg_id: "E38000244",
ced: null,
ced_id: "E99999999",
constituency_id: "E14000553",
constituency_2024_id: null,
constituency_id: "E14001085",
parliamentary_constituency: "Bermondsey and Old Southwark",
parliamentary_constituency_2024: null,
admin_district: "Southwark",
parish: "Southwark, unparished area",
admin_county: null,
Expand Down Expand Up @@ -154,13 +151,11 @@ describe("Postcode data regression testing", function () {
date_of_introduction: "199507",
ced_id: "L99999999",
constituency_id: "L99999999",
constituency_2024_id: null,
parliamentary_constituency: null,
parliamentary_constituency_2024: null,
admin_district: "Channel Islands",
parish: null,
admin_county: null,
admin_ward: "Channel Islands",
admin_ward: null,
ccg: null,
ccg_code: null,
nuts: null,
Expand Down

0 comments on commit f505fd2

Please sign in to comment.