Release 2.9.0
This commit is contained in:
@@ -2,6 +2,7 @@ const test = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
const fs = require('fs');
|
||||
|
||||
require('../src/common');
|
||||
const { createPlayerPlaylistService } = require('../src/player/playlist');
|
||||
|
||||
function createFsStub() {
|
||||
|
||||
@@ -44,7 +44,7 @@ test('pending migrations are empty when the schema already matches the app versi
|
||||
}
|
||||
]);
|
||||
|
||||
const pendingMigrations = await getPendingMigrations(pool, { currentVersion: '2.8.7' });
|
||||
const pendingMigrations = await getPendingMigrations(pool, { currentVersion: '2.8.9' });
|
||||
|
||||
assert.equal(pendingMigrations.length, 0);
|
||||
});
|
||||
@@ -74,7 +74,7 @@ test('pending migrations are reported when an older schema still needs scripts',
|
||||
const pendingMigrations = await getPendingMigrations(pool, { currentVersion: '2.6.17' });
|
||||
|
||||
assert.ok(pendingMigrations.length > 0);
|
||||
assert.equal(pendingMigrations.filter(function (migration) { return migration.version.indexOf('2.8.') === 0; }).length, 2);
|
||||
assert.equal(pendingMigrations.filter(function (migration) { return migration.version.indexOf('2.8.') === 0; }).length, 4);
|
||||
assert.equal(pendingMigrations.find(function (migration) { return migration.version.indexOf('2.8.') === 0; }).version, '2.8.0');
|
||||
});
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@ const slideWebpageRegionSource = fs.readFileSync(require.resolve('../src/web/pub
|
||||
|
||||
test('slide editor disables pasted data images in TinyMCE', () => {
|
||||
assert.ok(slideFormEditorSource.includes('paste_data_images: false'));
|
||||
assert.ok(slideFormEditorSource.includes('paste_block_drop: true'));
|
||||
assert.ok(slideFormEditorSource.includes('resize: false'));
|
||||
});
|
||||
|
||||
test('slide editor enables server-backed image uploads', () => {
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
const test = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
|
||||
const { convertWeatherSnapshot } = require('../src/data/weather-units');
|
||||
|
||||
test('converts cached weather snapshot values to selected units', () => {
|
||||
const snapshot = {
|
||||
current_units: { temperature_2m: '°C', apparent_temperature: '°C', wind_speed_10m: 'km/h', precipitation: 'mm' },
|
||||
current: { temperature_2m: 20, apparent_temperature: 18, wind_speed_10m: 36, precipitation: 2.54 },
|
||||
daily_units: { temperature_2m_max: '°C', temperature_2m_min: '°C', wind_speed_10m_max: 'km/h', precipitation_sum: 'mm' },
|
||||
daily: { temperature_2m_max: [25], temperature_2m_min: [15], wind_speed_10m_max: [18], precipitation_sum: [25.4] }
|
||||
};
|
||||
|
||||
const converted = convertWeatherSnapshot(snapshot, { temperature: 'fahrenheit', wind: 'mph', precipitation: 'inch' });
|
||||
|
||||
assert.equal(converted.current.temperature_2m, 68);
|
||||
assert.equal(converted.current.apparent_temperature, 64.4);
|
||||
assert.equal(converted.current.wind_speed_10m, 22.4);
|
||||
assert.equal(converted.current.precipitation, 0.1);
|
||||
assert.equal(converted.daily.temperature_2m_max[0], 77);
|
||||
assert.equal(converted.daily.wind_speed_10m_max[0], 11.2);
|
||||
assert.equal(converted.daily.precipitation_sum[0], 1);
|
||||
assert.equal(snapshot.current.temperature_2m, 20);
|
||||
});
|
||||
Reference in New Issue
Block a user