fix(runtime/deno): Enable Deno runtime tests by adding required permissions and local settings

This commit is contained in:
2025-10-10 16:45:06 +00:00
parent 9fa2c23ab2
commit 1de674e91d
3 changed files with 22 additions and 3 deletions

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@git.zone/tstest',
version: '2.4.0',
version: '2.4.1',
description: 'a test utility to run tests that match test/**/*.ts'
}

View File

@@ -33,7 +33,13 @@ export class DenoRuntimeAdapter extends RuntimeAdapter {
protected getDefaultOptions(): DenoOptions {
return {
...super.getDefaultOptions(),
permissions: ['--allow-read', '--allow-env'],
permissions: [
'--allow-read',
'--allow-env',
'--allow-net',
'--allow-write',
'--sloppy-imports', // Allow .js imports to resolve to .ts files
],
};
}
@@ -81,7 +87,13 @@ export class DenoRuntimeAdapter extends RuntimeAdapter {
const args: string[] = ['run'];
// Add permissions
const permissions = mergedOptions.permissions || ['--allow-read', '--allow-env'];
const permissions = mergedOptions.permissions || [
'--allow-read',
'--allow-env',
'--allow-net',
'--allow-write',
'--sloppy-imports',
];
args.push(...permissions);
// Add config file if specified