Merge remote-tracking branch 'origin/pr-536'
This commit is contained in:
commit
f848e70559
3 files changed
+50
-1
No files matched your search
@@ -0,0 +1,14 @@
|
||||
import { expect, test } from "bun:test";
|
||||
|
||||
import { createCreationSubmitGate } from "../src/pages/create/creation-submit-gate";
|
||||
|
||||
test("creation submit gate rejects a second submit until the first submit releases it", () => {
|
||||
const gate = createCreationSubmitGate();
|
||||
|
||||
expect(gate.tryAcquire()).toBe(true);
|
||||
expect(gate.tryAcquire()).toBe(false);
|
||||
|
||||
gate.release();
|
||||
|
||||
expect(gate.tryAcquire()).toBe(true);
|
||||
});
|
||||
Reference in new issue
Block a user