Skip to content

Commit

Permalink
Fix test wrt to error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrik Meijer committed May 3, 2024
1 parent abcfb6b commit 1b62ecb
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions test/bin/blob_fs_clean_up.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,15 @@ describe('BLOB cleanup script tests', function () {
done(new Error('missing error handling'));
})
.catch(function (err) {
expect(err.message).to.contains('Unexpected token o');
try {
expect(err.message).to.contains('Unexpected token');
done();
} catch (err) {
done(err);
}
})
.finally(()=> {
FS.unlinkSync('test-tmp/not.json');
done();
})
.done();
});
Expand All @@ -80,9 +86,15 @@ describe('BLOB cleanup script tests', function () {
done(new Error('missing error handling'));
})
.catch(function (err) {
expect(err.message).to.contains('no such file or directory, unlink');
try {
expect(err.message).to.contains('no such file or directory, unlink');
done();
} catch (err) {
done(err);
}
})
.finally(()=> {
FS.unlinkSync('test-tmp/wrongHashes.json');
done();
})
.done();
});
Expand Down

0 comments on commit 1b62ecb

Please sign in to comment.