If you run the test:
it.only("Does not increment version number if you add the same thing twice", async function() {
await repository.createNewObjectContent("xx", makeContent);
const object = await repository.createNewObjectContent("xx", makeContent);
const inventory = await object.getInventory();
assert.strictEqual(inventory.head, "v1");
});
and then look at the content of the ocfl repo you'll see there are no errors but the deposit folder has been left around:

If you change the test to (createNewObjectContent 3 times):
it.only("Does not increment version number if you add the same thing twice", async function() {
await repository.createNewObjectContent("xx", makeContent);
await repository.createNewObjectContent("xx", makeContent);
const object = await repository.createNewObjectContent("xx", makeContent);
const inventory = await object.getInventory();
assert.strictEqual(inventory.head, "v1");
});
You get an error:

If you run the test:
and then look at the content of the ocfl repo you'll see there are no errors but the deposit folder has been left around:
If you change the test to (createNewObjectContent 3 times):
You get an error: