mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-21 21:01:20 -08:00
fix(auto-thumbnail): [PKG-AUTO-THUMB-07] release terminal canvas storage
This commit is contained in:
1 parent
e93d3cbb67
commit
7be628a983
19 files changed
+4544
-15
No files matched your search
@@ -269,6 +269,7 @@ test('Auto-thumbnail candidate retains coercible numeric strings and fractional
|
||||
for (const option of [{ width: '80', number: '2', scale: '0.5' }, { width: 20.5, number: 2.5, scale: 1 }]) {
|
||||
const env = await setup(option)
|
||||
env.metadata()
|
||||
assert.equal(env.canvases[0].width, Math.trunc(Number(option.width) * 10))
|
||||
for (let index = 0; index < Math.ceil(Number(option.number)); index++) {
|
||||
env.seeked()
|
||||
env.finish(index)
|
||||
@@ -277,7 +278,7 @@ test('Auto-thumbnail candidate retains coercible numeric strings and fractional
|
||||
assert.equal(env.updates[0].width, option.width)
|
||||
assert.equal(env.updates[0].number, option.number)
|
||||
assert.equal(env.updates[0].scale, option.scale)
|
||||
assert.equal(env.canvases[0].width, Math.trunc(Number(option.width) * 10))
|
||||
assert.deepEqual([env.canvases[0].width, env.canvases[0].height], [0, 0])
|
||||
assertClosed(env)
|
||||
env.art.emit('destroy')
|
||||
assert.equal(env.urls.size, 0)
|
||||
|
||||
Reference in new issue
Block a user