文件操作 - test.mjs
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/@nuxt/cli/dist/chunks/test.mjs
编辑文件内容
import process from 'node:process'; import { defineCommand } from 'citty'; import { resolve } from 'pathe'; import { c as cwdArgs, l as logLevelArgs, b as legacyRootDirArgs, a as logger } from '../shared/cli.TH4BiEd5.mjs'; import 'node:path'; import 'std-env'; import 'consola'; import 'node:url'; const test = defineCommand({ meta: { name: "test", description: "Run tests" }, args: { ...cwdArgs, ...logLevelArgs, ...legacyRootDirArgs, dev: { type: "boolean", description: "Run in dev mode" }, watch: { type: "boolean", description: "Watch mode" } }, async run(ctx) { process.env.NODE_ENV = process.env.NODE_ENV || "test"; const cwd = resolve(ctx.args.cwd || ctx.args.rootDir); const { runTests } = await importTestUtils(); await runTests({ rootDir: cwd, dev: ctx.args.dev, watch: ctx.args.watch, ...{} }); } }); async function importTestUtils() { let err; for (const pkg of [ "@nuxt/test-utils-nightly", "@nuxt/test-utils-edge", "@nuxt/test-utils" ]) { try { const exports = await import(pkg); if (!exports.runTests) { throw new Error("Invalid version of `@nuxt/test-utils` is installed!"); } return exports; } catch (_err) { err = _err; } } logger.error(err); throw new Error("`@nuxt/test-utils` seems missing. Run `npm i -D @nuxt/test-utils` or `yarn add -D @nuxt/test-utils` to install."); } export { test as default };
修改文件时间
将文件时间修改为当前时间的前一年
删除文件