mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 15:33:12 +09:00
Add tests
This commit is contained in:
6 files changed
+476
-56
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import type { Application, Request, Response } from "express";
|
||||
import type Controller from "./Controller";
|
||||
import Controller from "./Controller";
|
||||
|
||||
import busboy from "busboy";
|
||||
import crypto from "crypto";
|
||||
|
||||
@@ -52,7 +52,11 @@ export function integer(value: number) {
|
||||
}
|
||||
}
|
||||
|
||||
/** Value must be a valid file path, it does not need to exist */
|
||||
/**
|
||||
* Value must be a valid file path, it does not need to exist
|
||||
* On posix this will only error for non string values, which isn't very useful
|
||||
* However, this could be expanded in the future to check system OS
|
||||
*/
|
||||
export function filePath(value: string) {
|
||||
try {
|
||||
path.resolve(value);
|
||||
|
||||
Reference in new issue
Block a user