Fix some linting issues
This commit is contained in:
parent
82171731d7
commit
2b28e3a660
@ -89,7 +89,7 @@ import TestRegister from "../lib/TestRegister.mjs";
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
testObjs.forEach(obj => {
|
testObjs.forEach(obj => {
|
||||||
if (obj !== 'SplitColourChannels')
|
if (obj !== "SplitColourChannels")
|
||||||
code += `import "./tests/${obj}.mjs";\n`;
|
code += `import "./tests/${obj}.mjs";\n`;
|
||||||
else
|
else
|
||||||
code += `// Cannot test operations that use the File type yet
|
code += `// Cannot test operations that use the File type yet
|
||||||
@ -121,5 +121,3 @@ fs.writeFileSync(
|
|||||||
code
|
code
|
||||||
);
|
);
|
||||||
console.log("Written operation tests index.");
|
console.log("Written operation tests index.");
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@ const testDir = path.join(process.cwd() + "/tests/operations/tests/");
|
|||||||
const configFile = "/.gitconfig";
|
const configFile = "/.gitconfig";
|
||||||
let gitUserEmail, gitUserName;
|
let gitUserEmail, gitUserName;
|
||||||
// gitconfig in root is better than global one
|
// gitconfig in root is better than global one
|
||||||
let gitConfig = process.cwd() + '/.git/config';
|
let gitConfig = process.cwd() + "/.git/config";
|
||||||
if (!fs.existsSync(gitConfig)) {
|
if (!fs.existsSync(gitConfig)) {
|
||||||
gitConfig = process.env.HOME + configFile;
|
gitConfig = process.env.HOME + configFile;
|
||||||
}
|
}
|
||||||
@ -38,7 +38,7 @@ if (fs.existsSync(gitConfig)) {
|
|||||||
const config = iniparser.parseSync(gitConfig);
|
const config = iniparser.parseSync(gitConfig);
|
||||||
if ("user" in config) {
|
if ("user" in config) {
|
||||||
if ("email" in config.user) gitUserEmail = config.user.email;
|
if ("email" in config.user) gitUserEmail = config.user.email;
|
||||||
if ("name" in config.user) gitUserName = config.user.name;
|
if ("name" in config.user) gitUserName = config.user.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ prompt.get(schema, (err, result) => {
|
|||||||
|
|
||||||
const testTemplate = `/**
|
const testTemplate = `/**
|
||||||
* ${moduleName} tests
|
* ${moduleName} tests
|
||||||
*
|
*
|
||||||
* @author ${result.authorName} [${result.authorEmail}]
|
* @author ${result.authorName} [${result.authorEmail}]
|
||||||
* @copyright Crown Copyright ${(new Date()).getFullYear()}
|
* @copyright Crown Copyright ${(new Date()).getFullYear()}
|
||||||
* @license Apache-2.0
|
* @license Apache-2.0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user