From bf2e8f9a7dab89e74c32b512682a57a9360b7c03 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 22 Mar 2024 21:03:18 +0000 Subject: [PATCH] =?UTF-8?q?chore:=20cloudcmd:=20actions:=20lint=20?= =?UTF-8?q?=E2=98=98=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/route.spec.mjs | 2 +- test/rest/copy.mjs | 3 +++ test/server/modulas.mjs | 3 +-- test/static.mjs | 2 ++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/server/route.spec.mjs b/server/route.spec.mjs index 7d9e625d..696c4d18 100644 --- a/server/route.spec.mjs +++ b/server/route.spec.mjs @@ -325,7 +325,7 @@ test('cloudcmd: route: buttons: no terminal', async (t) => { t.end(); }); -test('cloudcmd: route: no termianl: /fs', async (t) => { +test('cloudcmd: route: no terminal: /fs', async (t) => { const config = { terminal: false, }; diff --git a/test/rest/copy.mjs b/test/rest/copy.mjs index 99e766ce..3c673b7b 100644 --- a/test/rest/copy.mjs +++ b/test/rest/copy.mjs @@ -8,9 +8,11 @@ import cloudcmd from '../../server/cloudcmd.mjs'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); + const config = { root: new URL('..', import.meta.url).pathname, }; + const configManager = cloudcmd.createConfigManager(); configManager('auth', false); @@ -18,6 +20,7 @@ const {request} = serveOnce(cloudcmd, { config, configManager, }); + const fixtureDir = join(__dirname, '..', 'fixture') + '/'; test('cloudcmd: rest: copy', async (t) => { diff --git a/test/server/modulas.mjs b/test/server/modulas.mjs index 7716787e..ed2f736f 100644 --- a/test/server/modulas.mjs +++ b/test/server/modulas.mjs @@ -1,10 +1,8 @@ import {createRequire} from 'node:module'; import {dirname, join} from 'node:path'; import {fileURLToPath} from 'node:url'; - import serveOnce from 'serve-once'; import {test, stub} from 'supertape'; - import cloudcmd from '../../server/cloudcmd.mjs'; const __filename = fileURLToPath(import.meta.url); @@ -15,6 +13,7 @@ const cloudcmdPath = join(__dirname, '..', '..'); const modulesPath = join(cloudcmdPath, 'json', 'modules.json'); const localModules = require(modulesPath); const modulas = require(`../../server/modulas`); + const {request} = serveOnce(cloudcmd, { config: { auth: false, diff --git a/test/static.mjs b/test/static.mjs index 3033e4e6..8d65c384 100644 --- a/test/static.mjs +++ b/test/static.mjs @@ -6,9 +6,11 @@ import cloudcmd from '../server/cloudcmd.mjs'; const config = { auth: false, }; + const {request} = serveOnce(cloudcmd, { config, }); + const configFn = cloudcmd.createConfigManager(); test('cloudcmd: static', async (t) => {