mirror of
https://github.com/tiennm99/is-a-good-dev.git
synced 2026-07-29 08:21:07 +00:00
@@ -57,6 +57,5 @@ test('Check if JSON file matches the value name', () => {
|
||||
let fileNameMessage = passed === true ? "File name matches target.RECORD_TYPE." : "File name does not match any target.RECORD_TYPE.";
|
||||
|
||||
core.setOutput('fileNameMessage', fileNameMessage);
|
||||
expect(typeof passed).toBe('boolean'); // Check if the result is a boolean
|
||||
expect(passed).toBe(true);
|
||||
});
|
||||
|
||||
@@ -7,7 +7,7 @@ function getFileName(file, data) {
|
||||
// Validate if the file name matches any of the target.RECORD_TYPE values
|
||||
const recordTypes = Object.values(data.target);
|
||||
|
||||
return recordTypes[0].name == fileNameWithoutExt.toLowerCase();
|
||||
return recordTypes[0].name == fileNameWithoutExt.toLowerCase().split("/")[1];
|
||||
}
|
||||
|
||||
module.exports = getFileName;
|
||||
module.exports = getFileName;
|
||||
|
||||
Reference in New Issue
Block a user