diff --git a/Community/Tdarr_Plugin_00td_filter_by_size.js b/Community/Tdarr_Plugin_00td_filter_by_size.js index f2321a9..2e9ae67 100644 --- a/Community/Tdarr_Plugin_00td_filter_by_size.js +++ b/Community/Tdarr_Plugin_00td_filter_by_size.js @@ -1,4 +1,3 @@ -// tdarrSkipTest const details = () => ({ id: 'Tdarr_Plugin_00td_filter_by_size', Stage: 'Pre-processing', diff --git a/tests/Community/Tdarr_Plugin_00td_filter_by_size.js b/tests/Community/Tdarr_Plugin_00td_filter_by_size.js new file mode 100644 index 0000000..a869c4c --- /dev/null +++ b/tests/Community/Tdarr_Plugin_00td_filter_by_size.js @@ -0,0 +1,64 @@ +/* eslint max-len: 0 */ +const run = require('../helpers/run'); + +const tests = [ + { + input: { + file: require('../sampleData/media/sampleH264_1.json'), + librarySettings: {}, + inputs: {}, + otherArguments: {}, + }, + output: { + processFile: true, + infoLog: 'File is within lower and upper bound size limits. Moving to next plugin.', + }, + }, + { + input: { + file: require('../sampleData/media/sampleH264_1.json'), + librarySettings: {}, + inputs: { + upperBound: 0.5, + lowerBound: 0, + }, + otherArguments: {}, + }, + output: { + processFile: false, + infoLog: 'File is not within lower and upper bound size limits. Breaking out of plugin stack.', + }, + }, + { + input: { + file: require('../sampleData/media/sampleH264_1.json'), + librarySettings: {}, + inputs: { + upperBound: 2, + lowerBound: 0, + }, + otherArguments: {}, + }, + output: { + processFile: true, + infoLog: 'File is within lower and upper bound size limits. Moving to next plugin.', + }, + }, + { + input: { + file: require('../sampleData/media/sampleH264_1.json'), + librarySettings: {}, + inputs: { + upperBound: 4, + lowerBound: 2, + }, + otherArguments: {}, + }, + output: { + processFile: false, + infoLog: 'File is not within lower and upper bound size limits. Breaking out of plugin stack.', + }, + }, +]; + +run(tests);