mirror of
https://github.com/ivuorinen/config-checker.git
synced 2026-02-15 14:48:56 +00:00
feat: modernize workflows and standardize configuration files (#85)
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
/* eslint no-console: "off" -- CLI app that gives users feedback */
|
||||
|
||||
const path = require('node:path')
|
||||
const configChecker = require('..')
|
||||
const assert = require('node:assert').strict
|
||||
const path = require("node:path");
|
||||
const configChecker = require("..");
|
||||
const assert = require("node:assert").strict;
|
||||
|
||||
const configs = configChecker('test', path.join(__dirname, 'fixtures'))
|
||||
const configs = configChecker("test", path.join(__dirname, "fixtures"));
|
||||
|
||||
/**
|
||||
* Checks if an array contains a file.
|
||||
@@ -12,9 +12,9 @@ const configs = configChecker('test', path.join(__dirname, 'fixtures'))
|
||||
* @param {string} file The file to check for.
|
||||
* @returns {boolean} - True if the array contains the file.
|
||||
*/
|
||||
const arrayContains = (c = [], file = '') => c.includes(file)
|
||||
const arrayContains = (c = [], file = "") => c.includes(file);
|
||||
|
||||
assert.ok(arrayContains(configs, '.testrc'))
|
||||
assert.ok(arrayContains(configs, '.config/testrc.ts'))
|
||||
assert.ok(arrayContains(configs, ".testrc"));
|
||||
assert.ok(arrayContains(configs, ".config/testrc.ts"));
|
||||
|
||||
console.info('configChecker tests passed')
|
||||
console.info("configChecker tests passed");
|
||||
|
||||
Reference in New Issue
Block a user