Spaces:
Running
Running
File size: 832 Bytes
11486ce b1cfe1b 11486ce | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | import { hasReachedEditSourceImageLimit } from './edit-source-limits';
import { IMAGE_UPSTREAM_PROFILES } from './image-upstream-profile';
import assert from 'node:assert/strict';
import { describe, it } from 'node:test';
describe('hasReachedEditSourceImageLimit', () => {
it('uses the active upstream profile upload limit for edit-source entry points', () => {
assert.equal(
hasReachedEditSourceImageLimit({
currentCount: 8,
maxImages: IMAGE_UPSTREAM_PROFILES.matsca.upload.maxImages
}),
true
);
assert.equal(
hasReachedEditSourceImageLimit({
currentCount: 8,
maxImages: IMAGE_UPSTREAM_PROFILES['openai-compatible'].upload.maxImages
}),
false
);
});
});
|