mirror of
https://github.com/lovell/sharp.git
synced 2025-07-13 12:20:13 +02:00
Tests: tile-based output optional, will require custom libvips
The prebuilt binaries provided by v0.32.0 will not support tile-based output, which is (hopefully) a temporary situation until upstream licensing issues are resolved.
This commit is contained in:
parent
a44da850c1
commit
8b8a815fbb
@ -56,6 +56,9 @@ Requires libvips v8.14.0
|
||||
* Ensure all async JS callbacks are wrapped to help avoid possible race condition.
|
||||
[#3569](https://github.com/lovell/sharp/issues/3569)
|
||||
|
||||
* Prebuilt binaries: support for tile-based output temporarily removed due to licensing issue.
|
||||
[#3581](https://github.com/lovell/sharp/issues/3581)
|
||||
|
||||
* Add support to `normalise` for `lower` and `upper` percentiles.
|
||||
[#3583](https://github.com/lovell/sharp/pull/3583)
|
||||
[@LachlanNewman](https://github.com/LachlanNewman)
|
||||
|
@ -220,21 +220,16 @@ describe('Tile', function () {
|
||||
|
||||
it('Valid depths pass', function () {
|
||||
['onepixel', 'onetile', 'one'].forEach(function (depth) {
|
||||
assert.doesNotThrow(function (depth) {
|
||||
sharp().tile({
|
||||
depth: depth
|
||||
});
|
||||
});
|
||||
assert.doesNotThrow(() => sharp().tile({ depth }));
|
||||
});
|
||||
});
|
||||
|
||||
it('Invalid depths fail', function () {
|
||||
['depth', 1].forEach(function (depth) {
|
||||
assert.throws(function () {
|
||||
sharp().tile({
|
||||
depth: depth
|
||||
});
|
||||
});
|
||||
assert.throws(
|
||||
() => sharp().tile({ depth }),
|
||||
/Expected one of: onepixel, onetile, one for depth but received/
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@ -295,12 +290,17 @@ describe('Tile', function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('Invalid center parameter value fail', function () {
|
||||
assert.throws(function () {
|
||||
sharp().tile({
|
||||
centre: 'true'
|
||||
});
|
||||
it('Valid center parameter value passes', function () {
|
||||
assert.doesNotThrow(
|
||||
() => sharp().tile({ center: true })
|
||||
);
|
||||
});
|
||||
|
||||
it('Invalid centre parameter value fails', function () {
|
||||
assert.throws(
|
||||
() => sharp().tile({ centre: 'true' }),
|
||||
/Expected boolean for tileCentre but received true of type string/
|
||||
);
|
||||
});
|
||||
|
||||
it('Valid id parameter value passes', function () {
|
||||
@ -319,14 +319,20 @@ describe('Tile', function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('Invalid basename parameter value fails', function () {
|
||||
assert.throws(function () {
|
||||
sharp().tile({
|
||||
basename: true
|
||||
});
|
||||
});
|
||||
it('Valid basename parameter value passes', function () {
|
||||
assert.doesNotThrow(
|
||||
() => sharp().tile({ basename: 'pass' })
|
||||
);
|
||||
});
|
||||
|
||||
it('Invalid basename parameter value fails', function () {
|
||||
assert.throws(
|
||||
() => sharp().tile({ basename: true }),
|
||||
/Expected string for basename but received/
|
||||
);
|
||||
});
|
||||
|
||||
if (sharp.format.dz.output.file) {
|
||||
it('Deep Zoom layout', function (done) {
|
||||
const directory = fixtures.path('output.dzi_files');
|
||||
fs.rm(directory, { recursive: true }, function () {
|
||||
@ -991,4 +997,5 @@ describe('Tile', function () {
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user