Skip to content

Commit

Permalink
Fix tests now they to stop them inheriting from base prettierrc file
Browse files Browse the repository at this point in the history
  • Loading branch information
BPScott committed Dec 15, 2019
1 parent c49334a commit 14840fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/prettier.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ const ruleTester = new RuleTester();
ruleTester.run('prettier', rule, {
valid: [
// Correct style.
{ code: '"";\n' },
// Single quote from .prettierrc.
{ code: `'';\n`, filename: getPrettierRcJsFilename('single-quote') },
{ code: `'';\n` },
// Double quote from .prettierrc.
{ code: '"";\n', filename: getPrettierRcJsFilename('double-quote') },
// Override .prettierrc from object option.
{
code: `var foo = {bar: 0};\n`,
Expand Down Expand Up @@ -134,7 +134,8 @@ function loadInvalidFixture(name) {
code: sections[1],
output: sections[2],
options: eval(sections[3]), // eslint-disable-line no-eval
errors: eval(sections[4]) // eslint-disable-line no-eval
errors: eval(sections[4]), // eslint-disable-line no-eval
filename: getPrettierRcJsFilename('double-quote', name + '.txt')
};
if (sections.length >= 6) {
item.filename = sections[5];
Expand Down
1 change: 1 addition & 0 deletions test/prettierrc/bracket-spacing/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"singleQuote": false,
"bracketSpacing": true
}

0 comments on commit 14840fa

Please sign in to comment.