From d1d70f5f94e3991c286f1bfe20efabf6e0536452 Mon Sep 17 00:00:00 2001 From: Michael Taylor Date: Mon, 24 Jul 2023 14:30:23 -0400 Subject: [PATCH] fix: tests --- tests/resources/projects.spec.js | 2 +- tests/resources/staging.spec.js | 2 +- tests/resources/units.spec.js | 2 +- tests/test-data/new-project.js | 83 +++++++++++++++++++++++++ tests/test-data/new-project.json | 78 ----------------------- tests/test-data/new-unit.js | 42 +++++++++++++ tests/test-data/new-unit.json | 41 ------------ tests/test-data/update-project.js | 80 ++++++++++++++++++++++++ tests/test-data/update-project.json | 78 ----------------------- tests/test-data/update-unit.js | 41 ++++++++++++ tests/test-data/update-unit.json | 41 ------------ tests/test-fixtures/project-fixtures.js | 4 +- tests/test-fixtures/unit-fixtures.js | 4 +- 13 files changed, 253 insertions(+), 245 deletions(-) create mode 100644 tests/test-data/new-project.js delete mode 100644 tests/test-data/new-project.json create mode 100644 tests/test-data/new-unit.js delete mode 100644 tests/test-data/new-unit.json create mode 100644 tests/test-data/update-project.js delete mode 100644 tests/test-data/update-project.json create mode 100644 tests/test-data/update-unit.js delete mode 100644 tests/test-data/update-unit.json diff --git a/tests/resources/projects.spec.js b/tests/resources/projects.spec.js index dd300271..e2a721cd 100644 --- a/tests/resources/projects.spec.js +++ b/tests/resources/projects.spec.js @@ -4,7 +4,7 @@ import * as testFixtures from '../test-fixtures'; import sinon from 'sinon'; import datalayer from '../../src/datalayer'; const { expect } = chai; -import newProject from '../test-data/new-project.json'; +import newProject from '../test-data/new-project.js'; import supertest from 'supertest'; import app from '../../src/server'; import { Organization } from '../../src/models/organizations/index.js'; diff --git a/tests/resources/staging.spec.js b/tests/resources/staging.spec.js index 2b4398be..c3a35968 100644 --- a/tests/resources/staging.spec.js +++ b/tests/resources/staging.spec.js @@ -1,6 +1,6 @@ import app from '../../src/server'; import supertest from 'supertest'; -import newProject from '../test-data/new-project.json'; +import newProject from '../test-data/new-project.js'; import { pullPickListValues } from '../../src/utils/data-loaders'; import { expect } from 'chai'; import { prepareDb } from '../../src/database'; diff --git a/tests/resources/units.spec.js b/tests/resources/units.spec.js index 82b08c14..0f677335 100644 --- a/tests/resources/units.spec.js +++ b/tests/resources/units.spec.js @@ -8,7 +8,7 @@ import app from '../../src/server'; import * as testFixtures from '../test-fixtures'; import datalayer from '../../src/datalayer'; import { prepareDb } from '../../src/database'; -import newUnit from '../test-data/new-unit.json'; +import newUnit from '../test-data/new-unit.js'; import { pullPickListValues } from '../../src/utils/data-loaders'; const TEST_WAIT_TIME = datalayer.POLLING_INTERVAL * 2; diff --git a/tests/test-data/new-project.js b/tests/test-data/new-project.js new file mode 100644 index 00000000..29fa9a1e --- /dev/null +++ b/tests/test-data/new-project.js @@ -0,0 +1,83 @@ +export default { + projectId: 'c9d147e2-bc07-4e68-a76d-43424fa8cd4e', + registryOfOrigin: 'Singapore National Registry', + currentRegistry: 'Singapore National Registry', + originProjectId: 'Singapore National Registry', + program: 'Restoration & Conservation', + projectName: 'Sungei Buloh Wetlands Conservation', + projectLink: 'https://www.nature.com/articles/s41467-021-21560-2', + projectDeveloper: + "NParks' National Biodiversity Centre, National Parks Board, Ridgeview Residential College", + sector: 'Transport', + projectType: 'Organic Waste Composting', + projectTags: 'Wetlands, Reforestation, Million trees', + coveredByNDC: 'Inside NDC', + ndcInformation: + 'The restoration and conservation project directly aligns to the Singaporean NDC goals to capture 1,000,000 tons of carbon by 2050. This project represents an estimated contribution of 27% towards the NDC.', + projectStatus: 'Registered', + projectStatusDate: '2022-01-31T00:05:45.701Z', + unitMetric: 'tCO2e', + methodology: + 'Recovery and utilization of gas from oil fields that would otherwise be flared or vented --- Version 7.0', + methodology2: + 'Recovery and utilization of gas from oil fields that would otherwise be flared or vented --- Version 7.0', + validationBody: 'SCS Global Services', + validationDate: '2021-06-01T17:00:45.701Z', + projectLocations: [ + { + country: 'Singapore', + inCountryRegion: 'N/A', + geographicIdentifier: '1°26′46″N 103°43′44″E', + }, + ], + labels: [ + { + label: 'Green-e® Climate Standard Endorsement', + labelType: 'Endorsement', + creditingPeriodStartDate: '2021-06-01T00:00:00.701Z', + creditingPeriodEndDate: '2031-05-30T23:59:59.701Z', + validityPeriodStartDate: '2021-01-01T00:08:00.701Z', + validityPeriodEndDate: '2025-12-31T23:59:59.701Z', + unitQuantity: 1200, + labelLink: 'https://www.green-e.org/programs/climate', + }, + ], + issuances: [ + { + startDate: '2021-02-01T00:00:00.701Z', + endDate: '2022-02-01T00:00:00.701Z', + verificationApproach: 'Atmosperic carbon dioxide measurements', + verificationReportDate: '2022-01-01T08:00:00.701Z', + verificationBody: 'NASA CMS', + }, + ], + coBenefits: [ + { + cobenefit: + 'Biodiversity through planting a variety of trees that are home to many native Singaporean species', + }, + ], + relatedProjects: [ + { + relatedProjectId: 'A34398', + relationshipType: 'Pasir Ris Park Conservation', + registry: 'Singapore National Registry', + }, + ], + projectRatings: [ + { + ratingType: 'CCQI', + ratingRangeHighest: 'A', + ratingRangeLowest: 'Z', + rating: 'G', + ratingLink: 'https://www.cdp.net/en/cities/cities-scores', + }, + ], + estimations: [ + { + creditingPeriodStart: '2021-06-01T00:00:00.701Z', + creditingPeriodEnd: '2031-05-30T23:59:59.701Z', + unitCount: 27000, + }, + ], +}; diff --git a/tests/test-data/new-project.json b/tests/test-data/new-project.json deleted file mode 100644 index 219cecba..00000000 --- a/tests/test-data/new-project.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "projectId": "c9d147e2-bc07-4e68-a76d-43424fa8cd4e", - "registryOfOrigin": "Singapore National Registry", - "currentRegistry": "Singapore National Registry", - "originProjectId": "Singapore National Registry", - "program": "Restoration & Conservation", - "projectName": "Sungei Buloh Wetlands Conservation", - "projectLink": "https://www.nature.com/articles/s41467-021-21560-2", - "projectDeveloper": "NParks' National Biodiversity Centre, National Parks Board, Ridgeview Residential College", - "sector": "Transport", - "projectType": "Organic Waste Composting", - "projectTags": "Wetlands, Reforestation, Million trees", - "coveredByNDC": "Inside NDC", - "ndcInformation": "The restoration and conservation project directly aligns to the Singaporean NDC goals to capture 1,000,000 tons of carbon by 2050. This project represents an estimated contribution of 27% towards the NDC.", - "projectStatus": "Registered", - "projectStatusDate": "2022-01-31T00:05:45.701Z", - "unitMetric": "tCO2e", - "methodology": "Recovery and utilization of gas from oil fields that would otherwise be flared or vented --- Version 7.0", - "methodology2": "Recovery and utilization of gas from oil fields that would otherwise be flared or vented --- Version 7.0", - "validationBody": "SCS Global Services", - "validationDate": "2021-06-01T17:00:45.701Z", - "projectLocations": [ - { - "country": "Singapore", - "inCountryRegion": "N/A", - "geographicIdentifier": "1°26′46″N 103°43′44″E" - } - ], - "labels": [ - { - "label": "Green-e® Climate Standard Endorsement", - "labelType": "Endorsement", - "creditingPeriodStartDate": "2021-06-01T00:00:00.701Z", - "creditingPeriodEndDate": "2031-05-30T23:59:59.701Z", - "validityPeriodStartDate": "2021-01-01T00:08:00.701Z", - "validityPeriodEndDate": "2025-12-31T23:59:59.701Z", - "unitQuantity": 1200, - "labelLink": "https://www.green-e.org/programs/climate" - } - ], - "issuances": [ - { - "startDate": "2021-02-01T00:00:00.701Z", - "endDate": "2022-02-01T00:00:00.701Z", - "verificationApproach": "Atmosperic carbon dioxide measurements", - "verificationReportDate": "2022-01-01T08:00:00.701Z", - "verificationBody": "NASA CMS" - } - ], - "coBenefits": [ - { - "cobenefit": "Biodiversity through planting a variety of trees that are home to many native Singaporean species" - } - ], - "relatedProjects": [ - { - "relatedProjectId": "A34398", - "relationshipType": "Pasir Ris Park Conservation", - "registry": "Singapore National Registry" - } - ], - "projectRatings": [ - { - "ratingType": "CCQI", - "ratingRangeHighest": "A", - "ratingRangeLowest": "Z", - "rating": "G", - "ratingLink": "https://www.cdp.net/en/cities/cities-scores" - } - ], - "estimations": [ - { - "creditingPeriodStart": "2021-06-01T00:00:00.701Z", - "creditingPeriodEnd": "2031-05-30T23:59:59.701Z", - "unitCount": 27000 - } - ] -} diff --git a/tests/test-data/new-unit.js b/tests/test-data/new-unit.js new file mode 100644 index 00000000..fd789f74 --- /dev/null +++ b/tests/test-data/new-unit.js @@ -0,0 +1,42 @@ +export default { + unitOwner: 'f1c54511-865e-4611-976c-7c3c1f704662', + countryJurisdictionOfOwner: 'Netherlands', + projectLocationId: 'lkjw2er1-nj23-1212-532-dsjdx5-k131', + inCountryJurisdictionOfOwner: 'California', + unitBlockStart: 'AXJJFSLGHSHEJ1000', + unitBlockEnd: 'AXJJFSLGHSHEJ1010', + unitCount: 10, + vintageYear: 2016, + unitType: 'Removal - nature', + marketplace: 'California Carbon', + marketplaceLink: 'https://www.californiacarbon.info/', + marketplaceIdentifier: 'CCMT405', + unitTags: 'CC&S, Sequestration, carbon bury', + unitStatus: 'Held', + unitStatusReason: 'N/A', + unitRegistryLink: + 'https://www.climateactionreserve.org/about-us/california-climate-action-registry/', + correspondingAdjustmentDeclaration: 'Committed', + correspondingAdjustmentStatus: 'Not Started', + labels: [ + { + warehouseProjectId: '11954678-f7a5-47d2-94f8-f4f3138a529c', + label: 'Green-e® Climate COC certification', + labelType: 'Certification', + creditingPeriodStartDate: '2014-01-10T00:05:45.701Z', + creditingPeriodEndDate: '2019-01-09T00:05:45.701Z', + validityPeriodStartDate: '2014-02-01T00:05:45.701Z', + validityPeriodEndDate: '2019-01-31T00:05:45.701Z', + unitQuantity: 7, + labelLink: 'https://www.green-e.org/programs/climate', + }, + ], + issuance: { + warehouseProjectId: '11954678-f7a5-47d2-94f8-f4f3138a529c', + startDate: '2014-01-01T00:05:45.701Z', + endDate: '2019-01-31T00:05:45.701Z', + verificationApproach: 'CO2 Detection Satelite', + verificationReportDate: '2016-06-15T00:05:45.701Z', + verificationBody: 'Carbon Mapper', + }, +}; diff --git a/tests/test-data/new-unit.json b/tests/test-data/new-unit.json deleted file mode 100644 index be0a8cc2..00000000 --- a/tests/test-data/new-unit.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "unitOwner": "f1c54511-865e-4611-976c-7c3c1f704662", - "countryJurisdictionOfOwner": "Netherlands", - "projectLocationId": "lkjw2er1-nj23-1212-532-dsjdx5-k131", - "inCountryJurisdictionOfOwner": "California", - "unitBlockStart": "AXJJFSLGHSHEJ1000", - "unitBlockEnd": "AXJJFSLGHSHEJ1010", - "unitCount": 10, - "vintageYear": 2016, - "unitType": "Removal - nature", - "marketplace": "California Carbon", - "marketplaceLink": "https://www.californiacarbon.info/", - "marketplaceIdentifier": "CCMT405", - "unitTags": "CC&S, Sequestration, carbon bury", - "unitStatus": "Held", - "unitStatusReason": "N/A", - "unitRegistryLink": "https://www.climateactionreserve.org/about-us/california-climate-action-registry/", - "correspondingAdjustmentDeclaration": "Committed", - "correspondingAdjustmentStatus": "Not Started", - "labels": [ - { - "warehouseProjectId": "11954678-f7a5-47d2-94f8-f4f3138a529c", - "label": "Green-e® Climate COC certification", - "labelType": "Certification", - "creditingPeriodStartDate": "2014-01-10T00:05:45.701Z", - "creditingPeriodEndDate": "2019-01-09T00:05:45.701Z", - "validityPeriodStartDate": "2014-02-01T00:05:45.701Z", - "validityPeriodEndDate": "2019-01-31T00:05:45.701Z", - "unitQuantity": 7, - "labelLink": "https://www.green-e.org/programs/climate" - } - ], - "issuance": { - "warehouseProjectId": "11954678-f7a5-47d2-94f8-f4f3138a529c", - "startDate": "2014-01-01T00:05:45.701Z", - "endDate": "2019-01-31T00:05:45.701Z", - "verificationApproach": "CO2 Detection Satelite", - "verificationReportDate": "2016-06-15T00:05:45.701Z", - "verificationBody": "Carbon Mapper" - } -} diff --git a/tests/test-data/update-project.js b/tests/test-data/update-project.js new file mode 100644 index 00000000..d8def5b0 --- /dev/null +++ b/tests/test-data/update-project.js @@ -0,0 +1,80 @@ +export default { + projectId: 'c9d147e2-bc07-4e68-a76d-43424fa8cd4e', + program: 'UPDATED', + projectName: 'UPDATED', + currentRegistry: 'Singapore National Registry', + registryOfOrigin: 'Singapore National Registry', + originProjectId: 'Singapore National Registry', + projectLink: 'UPDATED', + projectDeveloper: 'UPDATED', + sector: 'Energy demand', + projectType: 'Organic Waste Composting', + projectTags: 'UPDATED', + coveredByNDC: 'Outside NDC', + ndcInformation: 'UPDATED', + projectStatus: 'Completed', + projectStatusDate: '1970-01-01T00:00:00.001Z', + unitMetric: 'tCO2e', + methodology: + 'Decomposition of fluoroform (HFC-23) waste streams --- Version 6.0.0', + methodology2: + 'Decomposition of fluoroform (HFC-23) waste streams --- Version 6.0.0', + validationBody: '4K Earth Science Private Limited', + validationDate: '1970-01-01T00:00:00.001Z', + projectLocations: [ + { + country: 'Australia', + inCountryRegion: 'UPDATED', + geographicIdentifier: 'UPDATED', + }, + ], + labels: [ + { + label: 'UPDATED', + labelType: 'Certification', + creditingPeriodStartDate: '1970-01-01T00:00:00.001Z', + creditingPeriodEndDate: '1970-01-01T00:00:00.001Z', + validityPeriodStartDate: '1970-01-01T00:00:00.001Z', + validityPeriodEndDate: '1970-01-01T00:00:00.001Z', + unitQuantity: 7, + labelLink: 'UPDATED', + }, + ], + issuances: [ + { + startDate: '1970-01-01T00:00:00.001Z', + endDate: '1971-01-01T00:00:00.001Z', + verificationApproach: 'UPDATED', + verificationReportDate: '1970-01-01T00:00:00.001Z', + verificationBody: 'UPDATED', + }, + ], + coBenefits: [ + { + cobenefit: 'UPDATED', + }, + ], + relatedProjects: [ + { + relatedProjectId: 'UPDATED', + relationshipType: 'UPDATED', + registry: 'UPDATED', + }, + ], + projectRatings: [ + { + ratingType: 'CDP', + ratingRangeHighest: 'AA', + ratingRangeLowest: 'ZZ', + rating: 'GG', + ratingLink: 'UPDATED', + }, + ], + estimations: [ + { + creditingPeriodStart: '1970-01-01T00:00:00.001Z', + creditingPeriodEnd: '1971-01-01T00:00:00.001Z', + unitCount: 10, + }, + ], +}; diff --git a/tests/test-data/update-project.json b/tests/test-data/update-project.json deleted file mode 100644 index 87aaad5f..00000000 --- a/tests/test-data/update-project.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "projectId": "c9d147e2-bc07-4e68-a76d-43424fa8cd4e", - "program": "UPDATED", - "projectName": "UPDATED", - "currentRegistry": "Singapore National Registry", - "registryOfOrigin": "Singapore National Registry", - "originProjectId": "Singapore National Registry", - "projectLink": "UPDATED", - "projectDeveloper": "UPDATED", - "sector": "Energy demand", - "projectType": "Organic Waste Composting", - "projectTags": "UPDATED", - "coveredByNDC": "Outside NDC", - "ndcInformation": "UPDATED", - "projectStatus": "Completed", - "projectStatusDate": "1970-01-01T00:00:00.001Z", - "unitMetric": "tCO2e", - "methodology": "Decomposition of fluoroform (HFC-23) waste streams --- Version 6.0.0", - "methodology2": "Decomposition of fluoroform (HFC-23) waste streams --- Version 6.0.0", - "validationBody": "4K Earth Science Private Limited", - "validationDate": "1970-01-01T00:00:00.001Z", - "projectLocations": [ - { - "country": "Australia", - "inCountryRegion": "UPDATED", - "geographicIdentifier": "UPDATED" - } - ], - "labels": [ - { - "label": "UPDATED", - "labelType": "Certification", - "creditingPeriodStartDate": "1970-01-01T00:00:00.001Z", - "creditingPeriodEndDate": "1970-01-01T00:00:00.001Z", - "validityPeriodStartDate": "1970-01-01T00:00:00.001Z", - "validityPeriodEndDate": "1970-01-01T00:00:00.001Z", - "unitQuantity": 7, - "labelLink": "UPDATED" - } - ], - "issuances": [ - { - "startDate": "1970-01-01T00:00:00.001Z", - "endDate": "1971-01-01T00:00:00.001Z", - "verificationApproach": "UPDATED", - "verificationReportDate": "1970-01-01T00:00:00.001Z", - "verificationBody": "UPDATED" - } - ], - "coBenefits": [ - { - "cobenefit": "UPDATED" - } - ], - "relatedProjects": [ - { - "relatedProjectId": "UPDATED", - "relationshipType": "UPDATED", - "registry": "UPDATED" - } - ], - "projectRatings": [ - { - "ratingType": "CDP", - "ratingRangeHighest": "AA", - "ratingRangeLowest": "ZZ", - "rating": "GG", - "ratingLink": "UPDATED" - } - ], - "estimations": [ - { - "creditingPeriodStart": "1970-01-01T00:00:00.001Z", - "creditingPeriodEnd": "1971-01-01T00:00:00.001Z", - "unitCount": 10 - } - ] -} diff --git a/tests/test-data/update-unit.js b/tests/test-data/update-unit.js new file mode 100644 index 00000000..83e312aa --- /dev/null +++ b/tests/test-data/update-unit.js @@ -0,0 +1,41 @@ +export default { + unitOwner: 'UPDATED', + countryJurisdictionOfOwner: 'Australia', + projectLocationId: 'UPDATED', + inCountryJurisdictionOfOwner: 'UPDATED', + unitBlockStart: 'AXJJFSLGHSHEJ2000', + unitBlockEnd: 'AXJJFSLGHSHEJ2010', + unitCount: 10, + vintageYear: 1970, + unitType: 'Reduction - technical', + marketplace: 'UPDATED', + marketplaceLink: 'UPDATED', + marketplaceIdentifier: 'UPDATED', + unitTags: 'UPDATED', + unitStatus: 'Held', + unitStatusReason: 'UPDATED', + unitRegistryLink: 'UPDATED', + correspondingAdjustmentDeclaration: 'Committed', + correspondingAdjustmentStatus: 'Not Started', + labels: [ + { + warehouseProjectId: '11954678-f7a5-47d2-94f8-f4f3138a529c', + label: 'UPDATED', + labelType: 'Letter of Qualification', + creditingPeriodStartDate: '1970-01-01T00:00:00.001Z', + creditingPeriodEndDate: '1971-01-01T00:00:00.001Z', + validityPeriodStartDate: '1970-01-01T00:00:00.001Z', + validityPeriodEndDate: '1971-01-01T00:00:00.001Z', + unitQuantity: 5, + labelLink: 'UPDATED', + }, + ], + issuance: { + warehouseProjectId: '11954678-f7a5-47d2-94f8-f4f3138a529c', + startDate: '1970-01-01T00:00:00.001Z', + endDate: '1971-01-01T00:00:00.001Z', + verificationApproach: 'UPDATED', + verificationReportDate: '1970-01-01T00:00:00.001Z', + verificationBody: 'UPDATED', + }, +}; diff --git a/tests/test-data/update-unit.json b/tests/test-data/update-unit.json deleted file mode 100644 index cf9a8dc4..00000000 --- a/tests/test-data/update-unit.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "unitOwner": "UPDATED", - "countryJurisdictionOfOwner": "Australia", - "projectLocationId": "UPDATED", - "inCountryJurisdictionOfOwner": "UPDATED", - "unitBlockStart": "AXJJFSLGHSHEJ2000", - "unitBlockEnd": "AXJJFSLGHSHEJ2010", - "unitCount": 10, - "vintageYear": 1970, - "unitType": "Reduction - technical", - "marketplace": "UPDATED", - "marketplaceLink": "UPDATED", - "marketplaceIdentifier": "UPDATED", - "unitTags": "UPDATED", - "unitStatus": "Held", - "unitStatusReason": "UPDATED", - "unitRegistryLink": "UPDATED", - "correspondingAdjustmentDeclaration": "Committed", - "correspondingAdjustmentStatus": "Not Started", - "labels": [ - { - "warehouseProjectId": "11954678-f7a5-47d2-94f8-f4f3138a529c", - "label": "UPDATED", - "labelType": "Letter of Qualification", - "creditingPeriodStartDate": "1970-01-01T00:00:00.001Z", - "creditingPeriodEndDate": "1971-01-01T00:00:00.001Z", - "validityPeriodStartDate": "1970-01-01T00:00:00.001Z", - "validityPeriodEndDate": "1971-01-01T00:00:00.001Z", - "unitQuantity": 5, - "labelLink": "UPDATED" - } - ], - "issuance": { - "warehouseProjectId": "11954678-f7a5-47d2-94f8-f4f3138a529c", - "startDate": "1970-01-01T00:00:00.001Z", - "endDate": "1971-01-01T00:00:00.001Z", - "verificationApproach": "UPDATED", - "verificationReportDate": "1970-01-01T00:00:00.001Z", - "verificationBody": "UPDATED" - } -} diff --git a/tests/test-fixtures/project-fixtures.js b/tests/test-fixtures/project-fixtures.js index ff63fa83..2a27e467 100644 --- a/tests/test-fixtures/project-fixtures.js +++ b/tests/test-fixtures/project-fixtures.js @@ -5,8 +5,8 @@ import chai from 'chai'; const { expect } = chai; import app from '../../src/server'; -import newProject from '../test-data/new-project.json'; -import updateProjectJson from '../test-data/update-project.json'; +import newProject from '../test-data/new-project.js'; +import updateProjectJson from '../test-data/update-project.js'; import { ProjectMirror, Project } from '../../src/models'; export const createNewProject = async (payload = newProject) => { diff --git a/tests/test-fixtures/unit-fixtures.js b/tests/test-fixtures/unit-fixtures.js index c297fee8..e3948ca5 100644 --- a/tests/test-fixtures/unit-fixtures.js +++ b/tests/test-fixtures/unit-fixtures.js @@ -5,8 +5,8 @@ import chai from 'chai'; const { expect } = chai; import app from '../../src/server'; -import newUnit from '../test-data/new-unit.json'; -import updateUnitJson from '../test-data/update-unit.json'; +import newUnit from '../test-data/new-unit.js'; +import updateUnitJson from '../test-data/update-unit.js'; import { UnitMirror, Unit } from '../../src/models'; export const createNewUnit = async (payload = newUnit) => {