diff --git a/packages/server/package.json b/packages/server/package.json index a025d274f1..9c21fa4918 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -60,7 +60,9 @@ "!src/utilities/usageQuota.js", "!src/api/routes/tests/**/*", "!src/tests/**/*", - "!src/automations/tests/**/*" + "!src/automations/tests/**/*", + "!src/utilities/fileProcessor.js", + "!src/utilities/initialiseBudibase.js" ], "coverageReporters": [ "lcov", diff --git a/packages/server/src/utilities/createAppPackage.js b/packages/server/src/utilities/createAppPackage.js index a62e8c96df..9500554227 100644 --- a/packages/server/src/utilities/createAppPackage.js +++ b/packages/server/src/utilities/createAppPackage.js @@ -7,6 +7,8 @@ const packageJson = require("../../package.json") const streamPipeline = promisify(stream.pipeline) +// can't really test this due to the downloading nature of it, wouldn't be a great test case +/* istanbul ignore next */ exports.downloadExtractComponentLibraries = async appFolder => { const LIBRARIES = ["standard-components"] diff --git a/packages/server/src/utilities/exceptions.js b/packages/server/src/utilities/exceptions.js deleted file mode 100644 index e02c88eec3..0000000000 --- a/packages/server/src/utilities/exceptions.js +++ /dev/null @@ -1,16 +0,0 @@ -const statusCodes = require("./statusCodes") - -const errorWithStatus = (message, statusCode) => { - const e = new Error(message) - e.statusCode = statusCode - return e -} - -module.exports.unauthorized = message => - errorWithStatus(message, statusCodes.UNAUTHORIZED) - -module.exports.forbidden = message => - errorWithStatus(message, statusCodes.FORBIDDEN) - -module.exports.notfound = message => - errorWithStatus(message, statusCodes.NOT_FOUND)