mirror of
https://github.com/got-feedBack/feedBack.git
synced 2026-10-04 03:57:54 +00:00
Renames across the entire codebase: - slopsmith/Slopsmith/SLOPSMITH/SlopSmith -> feedBack/FeedBack/FEEDBACK/FeedBack - byron/Byron/Byrongamatos -> got-feedBack/got-feedBack/got-feedBack - /home/byron/ -> /opt/got-feedBack/ - byron@ougsoft.com -> hi@got-feedBack.org - github.com/byrongamatos/ -> github.com/got-feedback/ - com.byron. -> com.got-feedback. - SLOPSMITH_ env vars -> FEEDBACK_ with backward-compat fallback - Protocol/storage strings migrated with read-old/write-new pattern - window.slopsmith JS API -> window.feedBack (canonical) + backward-compat alias Refs: #rename-slopsmith
24 lines
1.3 KiB
JavaScript
24 lines
1.3 KiB
JavaScript
const { test } = require('node:test');
|
|
const assert = require('node:assert/strict');
|
|
const fs = require('node:fs');
|
|
const path = require('node:path');
|
|
const { loadCapabilities, ROOT } = require('./capabilities_test_harness');
|
|
|
|
test('unsupported capability-pipelines versions are incompatible and do not execute handlers', async () => {
|
|
const window = loadCapabilities();
|
|
const api = window.feedBack.capabilities;
|
|
const fixture = JSON.parse(fs.readFileSync(path.join(ROOT, 'tests', 'fixtures', 'plugin_capabilities', 'unsupported_capability_version.json'), 'utf8'));
|
|
let invoked = false;
|
|
fixture.capabilities.stems.handlers = { mute: () => { invoked = true; return { outcome: 'handled' }; } };
|
|
fixture.capabilities.stems.runtime = true;
|
|
|
|
api.registerParticipants([fixture]);
|
|
const result = await api.dispatch({ capability: 'stems', command: 'mute', source: 'test' });
|
|
const snapshot = api.snapshotDiagnostics();
|
|
|
|
assert.equal(invoked, false);
|
|
assert.equal(result.status, 'incompatible-version');
|
|
assert.equal(result.outcome, 'incompatible-version');
|
|
assert.equal(snapshot.unsupportedVersions.some(entry => entry.pluginId === 'future_capabilities'), true);
|
|
assert.equal(snapshot.participants.find(p => p.pluginId === 'future_capabilities').availability, 'incompatible');
|
|
}); |