Skip to content

Commit

Permalink
Merge branch 'main' into harmony-1891
Browse files Browse the repository at this point in the history
  • Loading branch information
vinnyinverso committed Oct 3, 2024
2 parents adde2fe + abe5e2f commit 62f59bc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions services/harmony/test/jobs/jobs-listing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const woodyJob2 = buildJob({
numInputGranules: 5,
});

const woodyJob2Labels = ['f🤢😬', 'b😵‍💫r'];
const woodyJob2Labels = ['foo', 'bazz'];

const woodySyncJob = buildJob({
username: 'woody',
Expand Down Expand Up @@ -125,7 +125,9 @@ describe('Jobs listing route', function () {

it('includes labels in the jobs links', function () {
const jobs = JSON.parse(this.res.text).jobs.map((j) => new Job(j)) as Job[];
const labels = jobs.map((j) => j.labels);
// need to use a consistent sort since the timestamps in sqlite are not fine-grained
// enough to guarantee the jobs are returned in the order they are created
const labels = jobs.sort((jobA, jobB) => jobA.progress - jobB.progress).map((j) => j.labels);
expect(labels).deep.equal([[], woodyJob2Labels, woodyJob1Labels]);
});

Expand Down

0 comments on commit 62f59bc

Please sign in to comment.