Skip to content

Commit 965ec99

Browse files
committed
✅ Test: changed config to getConfig direct
1 parent d176c8f commit 965ec99

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/prompConfig.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ import path from 'path';
33
import chalk from 'chalk';
44
import json from 'json-extra';
55
import getConfig from '../lib/getConfig';
6-
import { config, choices, questions } from '../lib/promptConfig';
6+
import { choices, questions } from '../lib/promptConfig';
77

88
const cwd = process.cwd();
99

1010
test('get configuration file equals .sgcrc_default', (t) => {
11-
t.deepEqual(config(), json.readToObjSync(path.join(cwd, '.sgcrc_default')));
11+
t.deepEqual(getConfig(), json.readToObjSync(path.join(cwd, '.sgcrc_default')));
1212
});
1313

1414
test('choices are the same as choices generated from .sgcrc_default', (t) => {
1515
const sgc = getConfig();
16-
const configuration = config();
16+
const configuration = getConfig();
1717
const choicesList = choices(configuration);
1818
const choicesArray = [];
1919

@@ -34,15 +34,15 @@ test('choices are the same as choices generated from .sgcrc_default', (t) => {
3434
});
3535

3636
test('check the values of the question object', (t) => {
37-
const configuration = config();
37+
const configuration = getConfig();
3838
const choicesList = choices(configuration);
3939
const questionsList = questions(choicesList);
4040

4141
t.deepEqual(typeof questionsList, 'object');
4242
});
4343

4444
test('validate functions in questions', (t) => {
45-
const configuration = config();
45+
const configuration = getConfig();
4646
const choicesList = choices(configuration);
4747
const questionsList = questions(choicesList);
4848

0 commit comments

Comments
 (0)