2017-07-10 15:26:36 +03:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
2017-10-02 19:08:34 +03:00
|
|
|
exports[`CLI overrides take precedence (stderr) 1`] = `""`;
|
|
|
|
|
|
|
|
exports[`CLI overrides take precedence (stdout) 1`] = `
|
2017-12-05 01:28:27 +03:00
|
|
|
"function f() {
|
|
|
|
console.log(
|
|
|
|
\\"should have tab width 8\\"
|
|
|
|
)
|
|
|
|
}
|
|
|
|
function f() {
|
|
|
|
console.log(
|
|
|
|
\\"should have space width 2\\"
|
|
|
|
)
|
|
|
|
}
|
|
|
|
function f() {
|
|
|
|
console.log(
|
|
|
|
\\"should have space width 8\\"
|
|
|
|
)
|
|
|
|
}
|
|
|
|
console.log(
|
2017-09-16 19:47:53 +03:00
|
|
|
\\"jest/__best-tests__/file.js should have semi\\"
|
2017-07-10 15:26:36 +03:00
|
|
|
);
|
|
|
|
console.log(
|
2017-09-16 19:47:53 +03:00
|
|
|
\\"jest/Component.js should not have semi\\"
|
2017-07-10 15:26:36 +03:00
|
|
|
)
|
|
|
|
console.log(
|
2017-09-16 19:47:53 +03:00
|
|
|
\\"jest/Component.test.js should have semi\\"
|
2017-07-10 15:26:36 +03:00
|
|
|
);
|
2017-09-16 19:47:53 +03:00
|
|
|
function js() {
|
2017-07-10 15:26:36 +03:00
|
|
|
console.log(
|
2017-09-16 19:47:53 +03:00
|
|
|
\\"js/file.js should have tab width 8\\"
|
2017-07-10 15:26:36 +03:00
|
|
|
);
|
|
|
|
}
|
|
|
|
\\"use strict\\";
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
tabWidth: 8
|
|
|
|
};
|
2017-09-16 19:47:53 +03:00
|
|
|
function noConfigJs() {
|
2017-07-10 15:26:36 +03:00
|
|
|
console.log(
|
2017-09-16 19:47:53 +03:00
|
|
|
\\"no-config/file.js should have no semicolons\\"
|
2017-07-10 15:26:36 +03:00
|
|
|
)
|
|
|
|
}
|
2017-09-16 19:47:53 +03:00
|
|
|
function packageJs() {
|
2017-07-10 15:26:36 +03:00
|
|
|
console.log(
|
2017-09-16 19:47:53 +03:00
|
|
|
\\"package/file.js should have tab width 3\\"
|
2017-07-10 15:26:36 +03:00
|
|
|
);
|
|
|
|
}
|
2017-09-16 19:47:53 +03:00
|
|
|
function rcJson() {
|
2017-07-10 15:26:36 +03:00
|
|
|
console.log.apply(
|
|
|
|
null,
|
|
|
|
[
|
2017-09-16 19:47:53 +03:00
|
|
|
'rc-json/file.js',
|
|
|
|
'should have trailing comma',
|
|
|
|
'and single quotes',
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
function rcYaml() {
|
|
|
|
console.log.apply(
|
|
|
|
null,
|
|
|
|
[
|
|
|
|
'rc-yaml/file.js',
|
2017-07-10 15:26:36 +03:00
|
|
|
'should have trailing comma',
|
|
|
|
'and single quotes',
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
"
|
|
|
|
`;
|
|
|
|
|
2017-10-02 19:08:34 +03:00
|
|
|
exports[`CLI overrides take precedence (write) 1`] = `Array []`;
|
|
|
|
|
|
|
|
exports[`accepts configuration from --config (stderr) 1`] = `""`;
|
|
|
|
|
|
|
|
exports[`accepts configuration from --config (stdout) 1`] = `
|
2017-09-16 19:47:53 +03:00
|
|
|
"function js() {
|
|
|
|
console.log(\\"js/file.js should have tab width 8\\")
|
2017-07-10 15:26:36 +03:00
|
|
|
}
|
|
|
|
"
|
|
|
|
`;
|
|
|
|
|
2017-10-02 19:08:34 +03:00
|
|
|
exports[`accepts configuration from --config (write) 1`] = `Array []`;
|
|
|
|
|
|
|
|
exports[`prints nothing when no file found with --find-config-path (stderr) 1`] = `""`;
|
|
|
|
|
|
|
|
exports[`prints nothing when no file found with --find-config-path (write) 1`] = `Array []`;
|
|
|
|
|
|
|
|
exports[`resolves configuration file with --find-config-path file (stderr) 1`] = `""`;
|
|
|
|
|
|
|
|
exports[`resolves configuration file with --find-config-path file (stdout) 1`] = `
|
2017-07-10 15:26:36 +03:00
|
|
|
".prettierrc
|
|
|
|
"
|
|
|
|
`;
|
|
|
|
|
2017-10-02 19:08:34 +03:00
|
|
|
exports[`resolves configuration file with --find-config-path file (write) 1`] = `Array []`;
|
|
|
|
|
|
|
|
exports[`resolves configuration from external files (stderr) 1`] = `""`;
|
|
|
|
|
|
|
|
exports[`resolves configuration from external files (stdout) 1`] = `
|
2017-12-05 01:28:27 +03:00
|
|
|
"function f() {
|
|
|
|
console.log(\\"should have tab width 8\\")
|
|
|
|
}
|
|
|
|
function f() {
|
|
|
|
console.log(\\"should have space width 2\\")
|
|
|
|
}
|
|
|
|
function f() {
|
|
|
|
console.log(\\"should have space width 8\\")
|
|
|
|
}
|
|
|
|
console.log(\\"jest/__best-tests__/file.js should have semi\\");
|
2017-09-16 19:47:53 +03:00
|
|
|
console.log(\\"jest/Component.js should not have semi\\")
|
|
|
|
console.log(\\"jest/Component.test.js should have semi\\");
|
|
|
|
function js() {
|
|
|
|
console.log(\\"js/file.js should have tab width 8\\");
|
2017-07-10 15:26:36 +03:00
|
|
|
}
|
|
|
|
\\"use strict\\";
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
tabWidth: 8
|
|
|
|
};
|
2017-09-16 19:47:53 +03:00
|
|
|
function noConfigJs() {
|
|
|
|
console.log(\\"no-config/file.js should have no semicolons\\")
|
2017-07-10 15:26:36 +03:00
|
|
|
}
|
2017-09-16 19:47:53 +03:00
|
|
|
function packageJs() {
|
|
|
|
console.log(\\"package/file.js should have tab width 3\\");
|
2017-07-10 15:26:36 +03:00
|
|
|
}
|
2017-09-16 19:47:53 +03:00
|
|
|
function rcJson() {
|
2017-07-10 15:26:36 +03:00
|
|
|
console.log.apply(null, [
|
2017-09-16 19:47:53 +03:00
|
|
|
'rc-json/file.js',
|
|
|
|
'should have trailing comma',
|
|
|
|
'and single quotes',
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
function rcYaml() {
|
|
|
|
console.log.apply(null, [
|
|
|
|
'rc-yaml/file.js',
|
2017-07-10 15:26:36 +03:00
|
|
|
'should have trailing comma',
|
|
|
|
'and single quotes',
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
"
|
|
|
|
`;
|
|
|
|
|
2017-10-02 19:08:34 +03:00
|
|
|
exports[`resolves configuration from external files (write) 1`] = `Array []`;
|
|
|
|
|
|
|
|
exports[`resolves configuration from external files and overrides by extname (stderr) 1`] = `""`;
|
|
|
|
|
|
|
|
exports[`resolves configuration from external files and overrides by extname (stdout) 1`] = `
|
2017-09-16 19:47:53 +03:00
|
|
|
"function noConfigTs() {
|
|
|
|
console.log(
|
|
|
|
\\"no-config/file.ts should have semicolons because it has a .ts extension\\"
|
|
|
|
);
|
2017-07-10 15:26:36 +03:00
|
|
|
}
|
2017-09-16 19:47:53 +03:00
|
|
|
function packageTs() {
|
|
|
|
console.log(
|
|
|
|
\\"package/file.ts should have tab width 5 because it has .ts extension\\"
|
|
|
|
);
|
2017-07-10 15:26:36 +03:00
|
|
|
}
|
|
|
|
"
|
|
|
|
`;
|
2017-09-16 19:47:53 +03:00
|
|
|
|
2017-10-02 19:08:34 +03:00
|
|
|
exports[`resolves configuration from external files and overrides by extname (write) 1`] = `Array []`;
|
|
|
|
|
|
|
|
exports[`resolves json configuration file with --find-config-path file (stderr) 1`] = `""`;
|
|
|
|
|
|
|
|
exports[`resolves json configuration file with --find-config-path file (stdout) 1`] = `
|
2017-09-16 19:47:53 +03:00
|
|
|
"rc-json/.prettierrc.json
|
|
|
|
"
|
|
|
|
`;
|
|
|
|
|
2017-10-02 19:08:34 +03:00
|
|
|
exports[`resolves json configuration file with --find-config-path file (write) 1`] = `Array []`;
|
|
|
|
|
|
|
|
exports[`resolves yaml configuration file with --find-config-path file (stderr) 1`] = `""`;
|
|
|
|
|
|
|
|
exports[`resolves yaml configuration file with --find-config-path file (stdout) 1`] = `
|
2017-09-16 19:47:53 +03:00
|
|
|
"rc-yaml/.prettierrc.yaml
|
|
|
|
"
|
|
|
|
`;
|
2017-10-02 19:08:34 +03:00
|
|
|
|
|
|
|
exports[`resolves yaml configuration file with --find-config-path file (write) 1`] = `Array []`;
|