Skip to content

Commit 9fa0d44

Browse files
committed
Updating tests so I can also stage regular files
1 parent 358119c commit 9fa0d44

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

staging/has-no-secret.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"NOT_A_SECRET":"Hopefully not a secret"
2+
"NOT_A_SECRET":"Hopefully not a secret",
3+
"NOT_A_SECRET_ARRAY":["No secrets here"]
34
}
File renamed without changes.

staging/staging.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
const exec = require('util').promisify(require('child_process').execFile);
1+
const path = require('path');
22
const ESLint = require("eslint").ESLint;
33
const assert = require('assert');
44

55

66
const TESTS = {
7-
'./staging.config.js':[
7+
'jsonc.eslintrc.js':[
88
{
99
name:'Should not detect non-secrets',
1010
file:'./staging/has-no-secret.json',
@@ -22,7 +22,7 @@ const TESTS = {
2222
describe('JSON compat testing', async () => {
2323
const configs = Object.entries(TESTS);
2424
for(const [config,tests] of configs){
25-
const eslint = new ESLint();
25+
const eslint = new ESLint({overrideConfigFile:path.join(__dirname,config)});
2626
const files = tests.map(test => test.file);
2727
const results = await eslint.lintFiles(files);
2828
describe(config,() => {

0 commit comments

Comments
 (0)