feat(assistant): complete controlled management attachments and native schedules
This commit is contained in:
1 parent
d0bc4b0da2
commit
8341986067
119 files changed
+20519
-1618
No files matched your search
@@ -1,7 +1,29 @@
|
||||
'use strict';
|
||||
const test=require('node:test'),assert=require('node:assert/strict'),path=require('node:path'),{spawnSync}=require('node:child_process');
|
||||
test('DSH installer read-only check verifies the pinned installed runtime',t=>{
|
||||
if(!require('../../src/modules/assistant/dsh-runtime.cjs').installedRuntime())return t.skip('Pinned DSH runtime is not installed');
|
||||
const result=spawnSync(process.execPath,[path.resolve(__dirname,'../../scripts/install-dsh-runtime.cjs'),'--check'],{encoding:'utf8',windowsHide:true});assert.equal(result.status,0,result.stderr);const value=JSON.parse(result.stdout);assert.equal(value.version,'0.2.1-rc.2');assert.equal(value.package,'@deepseek-ai/dsh');assert.equal(value.available,true);assert.ok(value.runtimePath.endsWith(path.join('dsh','lib','bin.js')));
|
||||
const test = require('node:test'),
|
||||
assert = require('node:assert/strict'),
|
||||
path = require('node:path'),
|
||||
{ spawnSync } = require('node:child_process');
|
||||
test('DSH installer read-only check verifies the pinned installed runtime', (t) => {
|
||||
if (!require('../../src/modules/assistant/dsh-runtime.cjs').installedRuntime())
|
||||
return t.skip('Pinned DSH runtime is not installed');
|
||||
const result = spawnSync(
|
||||
process.execPath,
|
||||
[path.resolve(__dirname, '../../scripts/install-dsh-runtime.cjs'), '--check'],
|
||||
{ encoding: 'utf8', windowsHide: true },
|
||||
);
|
||||
assert.equal(result.status, 0, result.stderr);
|
||||
const value = JSON.parse(result.stdout);
|
||||
assert.equal(value.version, '0.2.1-rc.2');
|
||||
assert.equal(value.package, '@deepseek-ai/dsh');
|
||||
assert.equal(value.available, true);
|
||||
assert.ok(value.runtimePath.endsWith(path.join('dsh', 'lib', 'bin.js')));
|
||||
});
|
||||
test('DSH installer rejects unknown options before installation', () => {
|
||||
const result = spawnSync(
|
||||
process.execPath,
|
||||
[path.resolve(__dirname, '../../scripts/install-dsh-runtime.cjs'), '--unsafe'],
|
||||
{ encoding: 'utf8', windowsHide: true },
|
||||
);
|
||||
assert.equal(result.status, 1);
|
||||
assert.match(result.stderr, /Unsupported option/);
|
||||
});
|
||||
test('DSH installer rejects unknown options before installation',()=>{const result=spawnSync(process.execPath,[path.resolve(__dirname,'../../scripts/install-dsh-runtime.cjs'),'--unsafe'],{encoding:'utf8',windowsHide:true});assert.equal(result.status,1);assert.match(result.stderr,/Unsupported option/);});
|
||||
Reference in new issue
Block a user