Skip to content

Commit

Permalink
update tests to match current expected values
Browse files Browse the repository at this point in the history
  • Loading branch information
hotzevzl committed Dec 6, 2024
1 parent 8f9f460 commit 5f96ab1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ const getFixtures = async () => {
},
{
provide: getRepositoryToken(GeoFeature),
useValue: { findOneOrFail: findGeoFeatureMock },
useValue: {
findOneOrFail: findGeoFeatureMock,
findOne: findGeoFeatureMock,
},
},
{
provide: GeoFeaturesService,
Expand Down
36 changes: 17 additions & 19 deletions api/apps/api/test/upload-feature/upload-feature.fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,25 +389,23 @@ export const getFixtures = async () => {
featureClassName: name,
},
});
expect(features).toEqual([
{
id: expect.any(String),
featureClassName: name,
featureDataStableIds: null,
description,
alias: null,
amountMax: 5296399725.20094,
amountMin: 820348505.9774874,
propertyName: null,
intersection: null,
creationStatus: JobStatus.created,
projectId,
isCustom: true,
isLegacy: false,
fromGeoprocessingOps: null,
geoprocessingOpsHash: null,
},
]);
const expectedFeature = new GeoFeature();
expectedFeature.id = expect.any(String);
expectedFeature.featureClassName = name;
expectedFeature.featureDataStableIds = [expect.any(String)];
expectedFeature.description = description;
expectedFeature.alias = null;
expectedFeature.amountMax = 5296399725.20094;
expectedFeature.amountMin = 820348505.9774874;
expectedFeature.propertyName = undefined;
expectedFeature.intersection = undefined;
expectedFeature.creationStatus = JobStatus.created;
expectedFeature.projectId = projectId;
expectedFeature.isCustom = true;
expectedFeature.isLegacy = false;
expectedFeature.fromGeoprocessingOps = undefined;
expectedFeature.geoprocessingOpsHash = undefined;
expect(features).toEqual([expectedFeature]);
expect(
await geoFeatureDataRepo.find({
where: {
Expand Down

0 comments on commit 5f96ab1

Please sign in to comment.