2017-09-05 01:56:23 +03:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
2017-10-02 19:08:34 +03:00
|
|
|
exports[`CLI --stdin-filepath works with --config-precedence cli-override (stdout) 1`] = `
|
2017-10-01 07:55:35 +03:00
|
|
|
"let x: keyof Y = foo<typeof X>()
|
|
|
|
"
|
|
|
|
`;
|
|
|
|
|
2017-10-02 19:08:34 +03:00
|
|
|
exports[`CLI --stdin-filepath works with --config-precedence cli-override (write) 1`] = `Array []`;
|
|
|
|
|
|
|
|
exports[`CLI --stdin-filepath works with --config-precedence file-override (stdout) 1`] = `
|
2017-10-01 07:55:35 +03:00
|
|
|
"let x: keyof Y = foo<typeof X>();
|
|
|
|
"
|
|
|
|
`;
|
|
|
|
|
2017-10-02 19:08:34 +03:00
|
|
|
exports[`CLI --stdin-filepath works with --config-precedence file-override (write) 1`] = `Array []`;
|
|
|
|
|
|
|
|
exports[`CLI --stdin-filepath works with --config-precedence prefer-file (stdout) 1`] = `
|
2017-10-01 07:55:35 +03:00
|
|
|
"let x: keyof Y = foo<typeof X>();
|
|
|
|
"
|
|
|
|
`;
|
|
|
|
|
2017-10-02 19:08:34 +03:00
|
|
|
exports[`CLI --stdin-filepath works with --config-precedence prefer-file (write) 1`] = `Array []`;
|
|
|
|
|
|
|
|
exports[`CLI overrides are still applied when no config is found with --config-precedence file-override (stderr) 1`] = `""`;
|
|
|
|
|
|
|
|
exports[`CLI overrides are still applied when no config is found with --config-precedence file-override (stdout) 1`] = `
|
2017-09-16 19:47:53 +03:00
|
|
|
"function noConfigJs() {
|
|
|
|
console.log(\\"no-config/file.js should have no semicolons\\")
|
2017-09-05 01:56:23 +03:00
|
|
|
}
|
|
|
|
"
|
|
|
|
`;
|
|
|
|
|
2017-10-02 19:08:34 +03:00
|
|
|
exports[`CLI overrides are still applied when no config is found with --config-precedence file-override (write) 1`] = `Array []`;
|
|
|
|
|
|
|
|
exports[`CLI overrides gets applied when no config exists with --config-precedence prefer-file (stderr) 1`] = `""`;
|
|
|
|
|
|
|
|
exports[`CLI overrides gets applied when no config exists with --config-precedence prefer-file (stdout) 1`] = `
|
2017-09-16 19:47:53 +03:00
|
|
|
"function noConfigJs() {
|
2017-09-05 01:56:23 +03:00
|
|
|
console.log(
|
2017-09-16 19:47:53 +03:00
|
|
|
\\"no-config/file.js should have no semicolons\\"
|
2017-09-05 01:56:23 +03:00
|
|
|
);
|
|
|
|
}
|
|
|
|
"
|
|
|
|
`;
|
|
|
|
|
2017-10-02 19:08:34 +03:00
|
|
|
exports[`CLI overrides gets applied when no config exists with --config-precedence prefer-file (write) 1`] = `Array []`;
|
|
|
|
|
|
|
|
exports[`CLI overrides gets ignored when config exists with --config-precedence prefer-file (stderr) 1`] = `""`;
|
|
|
|
|
|
|
|
exports[`CLI overrides gets ignored when config exists with --config-precedence prefer-file (stdout) 1`] = `
|
2017-09-16 19:47:53 +03:00
|
|
|
"function js() {
|
2018-02-24 11:11:23 +03:00
|
|
|
console.log(\\"js/file.js should have tab width 8 (1 if CLI)\\");
|
2017-09-05 01:56:23 +03:00
|
|
|
}
|
|
|
|
\\"use strict\\";
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
tabWidth: 8
|
|
|
|
};
|
|
|
|
"
|
|
|
|
`;
|
|
|
|
|
2017-10-02 19:08:34 +03:00
|
|
|
exports[`CLI overrides gets ignored when config exists with --config-precedence prefer-file (write) 1`] = `Array []`;
|
|
|
|
|
|
|
|
exports[`CLI overrides take lower precedence with --config-precedence file-override (stderr) 1`] = `""`;
|
|
|
|
|
|
|
|
exports[`CLI overrides take lower precedence with --config-precedence file-override (stdout) 1`] = `
|
2017-09-16 19:47:53 +03:00
|
|
|
"function js() {
|
2018-02-24 11:11:23 +03:00
|
|
|
console.log(\\"js/file.js should have tab width 8 (1 if CLI)\\");
|
2017-09-05 01:56:23 +03:00
|
|
|
}
|
|
|
|
\\"use strict\\";
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
tabWidth: 8
|
|
|
|
};
|
|
|
|
"
|
|
|
|
`;
|
|
|
|
|
2017-10-02 19:08:34 +03:00
|
|
|
exports[`CLI overrides take lower precedence with --config-precedence file-override (write) 1`] = `Array []`;
|
|
|
|
|
|
|
|
exports[`CLI overrides take precedence with --config-precedence cli-override (stderr) 1`] = `""`;
|
|
|
|
|
|
|
|
exports[`CLI overrides take precedence with --config-precedence cli-override (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\\"
|
|
|
|
)
|
|
|
|
}
|
2017-12-26 10:16:09 +03:00
|
|
|
function f() {
|
|
|
|
console.log(
|
|
|
|
\\"should have space width 2 despite ../.editorconfig specifying 8, because ./.hg is present\\"
|
|
|
|
)
|
|
|
|
}
|
2017-12-05 01:28:27 +03:00
|
|
|
console.log(
|
2017-09-16 19:47:53 +03:00
|
|
|
\\"jest/__best-tests__/file.js should have semi\\"
|
2017-09-05 01:56:23 +03:00
|
|
|
);
|
|
|
|
console.log(
|
2017-09-16 19:47:53 +03:00
|
|
|
\\"jest/Component.js should not have semi\\"
|
2017-09-05 01:56:23 +03:00
|
|
|
)
|
|
|
|
console.log(
|
2017-09-16 19:47:53 +03:00
|
|
|
\\"jest/Component.test.js should have semi\\"
|
2017-09-05 01:56:23 +03:00
|
|
|
);
|
2017-09-16 19:47:53 +03:00
|
|
|
function js() {
|
2017-09-05 01:56:23 +03:00
|
|
|
console.log(
|
2018-02-24 11:11:23 +03:00
|
|
|
\\"js/file.js should have tab width 8 (1 if CLI)\\"
|
2017-09-05 01:56:23 +03:00
|
|
|
);
|
|
|
|
}
|
|
|
|
\\"use strict\\";
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
tabWidth: 8
|
|
|
|
};
|
2017-09-16 19:47:53 +03:00
|
|
|
function noConfigJs() {
|
2017-09-05 01:56:23 +03:00
|
|
|
console.log(
|
2017-09-16 19:47:53 +03:00
|
|
|
\\"no-config/file.js should have no semicolons\\"
|
2017-09-05 01:56:23 +03:00
|
|
|
)
|
|
|
|
}
|
2017-09-16 19:47:53 +03:00
|
|
|
function packageJs() {
|
2017-09-05 01:56:23 +03:00
|
|
|
console.log(
|
2017-09-16 19:47:53 +03:00
|
|
|
\\"package/file.js should have tab width 3\\"
|
2017-09-05 01:56:23 +03:00
|
|
|
);
|
|
|
|
}
|
2017-09-16 19:47:53 +03:00
|
|
|
function rcJson() {
|
2017-09-05 01:56:23 +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-09-05 01:56:23 +03:00
|
|
|
'should have trailing comma',
|
|
|
|
'and single quotes',
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
"
|
|
|
|
`;
|
|
|
|
|
2017-10-02 19:08:34 +03:00
|
|
|
exports[`CLI overrides take precedence with --config-precedence cli-override (write) 1`] = `Array []`;
|
|
|
|
|
|
|
|
exports[`CLI overrides take precedence without --config-precedence (stderr) 1`] = `""`;
|
|
|
|
|
|
|
|
exports[`CLI overrides take precedence without --config-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\\"
|
|
|
|
)
|
|
|
|
}
|
2017-12-26 10:16:09 +03:00
|
|
|
function f() {
|
|
|
|
console.log(
|
|
|
|
\\"should have space width 2 despite ../.editorconfig specifying 8, because ./.hg is present\\"
|
|
|
|
)
|
|
|
|
}
|
2017-12-05 01:28:27 +03:00
|
|
|
console.log(
|
2017-09-16 19:47:53 +03:00
|
|
|
\\"jest/__best-tests__/file.js should have semi\\"
|
2017-09-05 01:56:23 +03:00
|
|
|
);
|
|
|
|
console.log(
|
2017-09-16 19:47:53 +03:00
|
|
|
\\"jest/Component.js should not have semi\\"
|
2017-09-05 01:56:23 +03:00
|
|
|
)
|
|
|
|
console.log(
|
2017-09-16 19:47:53 +03:00
|
|
|
\\"jest/Component.test.js should have semi\\"
|
2017-09-05 01:56:23 +03:00
|
|
|
);
|
2017-09-16 19:47:53 +03:00
|
|
|
function js() {
|
2017-09-05 01:56:23 +03:00
|
|
|
console.log(
|
2018-02-24 11:11:23 +03:00
|
|
|
\\"js/file.js should have tab width 8 (1 if CLI)\\"
|
2017-09-05 01:56:23 +03:00
|
|
|
);
|
|
|
|
}
|
|
|
|
\\"use strict\\";
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
tabWidth: 8
|
|
|
|
};
|
2017-09-16 19:47:53 +03:00
|
|
|
function noConfigJs() {
|
2017-09-05 01:56:23 +03:00
|
|
|
console.log(
|
2017-09-16 19:47:53 +03:00
|
|
|
\\"no-config/file.js should have no semicolons\\"
|
2017-09-05 01:56:23 +03:00
|
|
|
)
|
|
|
|
}
|
2017-09-16 19:47:53 +03:00
|
|
|
function packageJs() {
|
2017-09-05 01:56:23 +03:00
|
|
|
console.log(
|
2017-09-16 19:47:53 +03:00
|
|
|
\\"package/file.js should have tab width 3\\"
|
2017-09-05 01:56:23 +03:00
|
|
|
);
|
|
|
|
}
|
2017-09-16 19:47:53 +03:00
|
|
|
function rcJson() {
|
|
|
|
console.log.apply(
|
|
|
|
null,
|
|
|
|
[
|
|
|
|
'rc-json/file.js',
|
|
|
|
'should have trailing comma',
|
|
|
|
'and single quotes',
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
function rcYaml() {
|
2017-09-05 01:56:23 +03:00
|
|
|
console.log.apply(
|
|
|
|
null,
|
|
|
|
[
|
2017-09-16 19:47:53 +03:00
|
|
|
'rc-yaml/file.js',
|
2017-09-05 01:56:23 +03:00
|
|
|
'should have trailing comma',
|
|
|
|
'and single quotes',
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
"
|
|
|
|
`;
|
2017-09-25 22:04:25 +03:00
|
|
|
|
2017-10-02 19:08:34 +03:00
|
|
|
exports[`CLI overrides take precedence without --config-precedence (write) 1`] = `Array []`;
|
|
|
|
|
|
|
|
exports[`CLI validate options with --config-precedence cli-override (stderr) 1`] = `
|
2018-01-18 10:26:27 +03:00
|
|
|
"[error] Invalid \`\\"printWidth\\"\` value. Expected an integer, but received \`0.5\`.
|
2017-10-14 04:17:01 +03:00
|
|
|
"
|
2017-09-25 22:04:25 +03:00
|
|
|
`;
|
|
|
|
|
2017-10-02 19:08:34 +03:00
|
|
|
exports[`CLI validate options with --config-precedence cli-override (stdout) 1`] = `""`;
|
|
|
|
|
|
|
|
exports[`CLI validate options with --config-precedence cli-override (write) 1`] = `Array []`;
|
|
|
|
|
|
|
|
exports[`CLI validate options with --config-precedence file-override (stderr) 1`] = `
|
2018-01-18 10:26:27 +03:00
|
|
|
"[error] Invalid \`\\"printWidth\\"\` value. Expected an integer, but received \`0.5\`.
|
2017-10-14 04:17:01 +03:00
|
|
|
"
|
2017-09-25 22:04:25 +03:00
|
|
|
`;
|
|
|
|
|
2017-10-02 19:08:34 +03:00
|
|
|
exports[`CLI validate options with --config-precedence file-override (stdout) 1`] = `""`;
|
|
|
|
|
|
|
|
exports[`CLI validate options with --config-precedence file-override (write) 1`] = `Array []`;
|
|
|
|
|
|
|
|
exports[`CLI validate options with --config-precedence prefer-file (stderr) 1`] = `
|
2018-01-18 10:26:27 +03:00
|
|
|
"[error] Invalid \`\\"printWidth\\"\` value. Expected an integer, but received \`0.5\`.
|
2017-10-14 04:17:01 +03:00
|
|
|
"
|
2017-09-25 22:04:25 +03:00
|
|
|
`;
|
2017-10-02 19:08:34 +03:00
|
|
|
|
|
|
|
exports[`CLI validate options with --config-precedence prefer-file (stdout) 1`] = `""`;
|
|
|
|
|
|
|
|
exports[`CLI validate options with --config-precedence prefer-file (write) 1`] = `Array []`;
|