2017-07-10 15:26:36 +03:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
|
|
|
exports[`CLI overrides take precedence 1`] = `
|
2017-09-03 17:06:55 +03:00
|
|
|
"console.log(
|
2017-07-10 15:26:36 +03:00
|
|
|
\\"should have semi\\"
|
|
|
|
);
|
|
|
|
console.log(
|
|
|
|
\\"should not have semi\\"
|
|
|
|
)
|
|
|
|
console.log(
|
|
|
|
\\"should have semi\\"
|
|
|
|
);
|
|
|
|
function f() {
|
|
|
|
console.log(
|
|
|
|
\\"should have tab width 8\\"
|
|
|
|
);
|
|
|
|
}
|
|
|
|
\\"use strict\\";
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
tabWidth: 8
|
|
|
|
};
|
|
|
|
function f() {
|
|
|
|
console.log(
|
|
|
|
\\"should have no semicolons\\"
|
|
|
|
)
|
|
|
|
}
|
|
|
|
function f() {
|
|
|
|
console.log(
|
|
|
|
\\"should have tab width 3\\"
|
|
|
|
);
|
|
|
|
}
|
|
|
|
function f() {
|
|
|
|
console.log.apply(
|
|
|
|
null,
|
|
|
|
[
|
|
|
|
'this file',
|
|
|
|
'should have trailing comma',
|
|
|
|
'and single quotes',
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
"
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`accepts configuration from --config 1`] = `
|
2017-09-03 17:06:55 +03:00
|
|
|
"function f() {
|
2017-07-10 15:26:36 +03:00
|
|
|
console.log(\\"should have tab width 8\\")
|
|
|
|
}
|
|
|
|
"
|
|
|
|
`;
|
|
|
|
|
2017-07-11 16:57:26 +03:00
|
|
|
exports[`resolves configuration file with --find-config-path file 1`] = `
|
2017-07-10 15:26:36 +03:00
|
|
|
".prettierrc
|
|
|
|
"
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`resolves configuration from external files 1`] = `
|
2017-09-03 17:06:55 +03:00
|
|
|
"console.log(\\"should have semi\\");
|
2017-07-10 15:26:36 +03:00
|
|
|
console.log(\\"should not have semi\\")
|
|
|
|
console.log(\\"should have semi\\");
|
|
|
|
function f() {
|
|
|
|
console.log(\\"should have tab width 8\\");
|
|
|
|
}
|
|
|
|
\\"use strict\\";
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
tabWidth: 8
|
|
|
|
};
|
|
|
|
function f() {
|
|
|
|
console.log(\\"should have no semicolons\\")
|
|
|
|
}
|
|
|
|
function f() {
|
|
|
|
console.log(\\"should have tab width 3\\");
|
|
|
|
}
|
|
|
|
function f() {
|
|
|
|
console.log.apply(null, [
|
|
|
|
'this file',
|
|
|
|
'should have trailing comma',
|
|
|
|
'and single quotes',
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
"
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`resolves configuration from external files and overrides by extname 1`] = `
|
|
|
|
"function g() {
|
|
|
|
console.log(\\"should have semicolons because it has a .ts extension\\");
|
|
|
|
}
|
|
|
|
function g() {
|
|
|
|
console.log(\\"should have tab width 5 because it has .ts extension\\");
|
|
|
|
}
|
|
|
|
"
|
|
|
|
`;
|