mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-10 07:50:29 -07:00
Add new tests
This commit is contained in:
parent
e194e6d35c
commit
fa2b0abd92
9 changed files with 1011 additions and 2 deletions
59
tests/Community/Tdarr_Plugin_00td_filter_by_codec.js
Normal file
59
tests/Community/Tdarr_Plugin_00td_filter_by_codec.js
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
const run = require('../helpers/run');
|
||||
|
||||
const tests = [
|
||||
{
|
||||
input: {
|
||||
file: require('../sampleData/media/sampleH264_1.json'),
|
||||
librarySettings: {},
|
||||
inputs: {},
|
||||
otherArguments: {},
|
||||
},
|
||||
output: { processFile: false, infoLog: '' },
|
||||
},
|
||||
{
|
||||
input: {
|
||||
file: require('../sampleData/media/sampleH264_1.json'),
|
||||
librarySettings: {},
|
||||
inputs: {
|
||||
codecsToProcess: 'h264',
|
||||
},
|
||||
otherArguments: {},
|
||||
},
|
||||
output: { processFile: true, infoLog: 'File is in codecsToProcess. Moving to next plugin.' },
|
||||
},
|
||||
{
|
||||
input: {
|
||||
file: require('../sampleData/media/sampleH264_1.json'),
|
||||
librarySettings: {},
|
||||
inputs: {
|
||||
codecsToProcess: 'h265',
|
||||
},
|
||||
otherArguments: {},
|
||||
},
|
||||
output: { processFile: false, infoLog: 'File is not in codecsToProcess. Breaking out of plugin stack.' },
|
||||
},
|
||||
{
|
||||
input: {
|
||||
file: require('../sampleData/media/sampleH264_1.json'),
|
||||
librarySettings: {},
|
||||
inputs: {
|
||||
codecsToNotProcess: 'h264',
|
||||
},
|
||||
otherArguments: {},
|
||||
},
|
||||
output: { processFile: false, infoLog: 'File is in codecsToNotProcess. Breaking out of plugin stack.' },
|
||||
},
|
||||
{
|
||||
input: {
|
||||
file: require('../sampleData/media/sampleH264_1.json'),
|
||||
librarySettings: {},
|
||||
inputs: {
|
||||
codecsToNotProcess: 'h265',
|
||||
},
|
||||
otherArguments: {},
|
||||
},
|
||||
output: { processFile: true, infoLog: 'File is not in codecsToNotProcess. Moving to next plugin.' },
|
||||
},
|
||||
];
|
||||
|
||||
run(tests);
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
const run = require('../helpers/run');
|
||||
|
||||
const tests = [
|
||||
{
|
||||
input: {
|
||||
file: require('../sampleData/media/sampleH264_1.json'),
|
||||
librarySettings: {},
|
||||
inputs: {},
|
||||
otherArguments: {},
|
||||
},
|
||||
output: { processFile: false, infoLog: '' },
|
||||
},
|
||||
{
|
||||
input: {
|
||||
file: require('../sampleData/media/sampleH264_1.json'),
|
||||
librarySettings: {},
|
||||
inputs: {
|
||||
codecTagStringsToProcess: 'avc1,rand',
|
||||
},
|
||||
otherArguments: {},
|
||||
},
|
||||
output: { processFile: true, infoLog: 'File is in codecTagStringsToProcess. Moving to next plugin.' },
|
||||
},
|
||||
{
|
||||
input: {
|
||||
file: require('../sampleData/media/sampleH264_1.json'),
|
||||
librarySettings: {},
|
||||
inputs: {
|
||||
codecTagStringsToNotProcess: 'avc1,rand',
|
||||
},
|
||||
otherArguments: {},
|
||||
},
|
||||
output: { processFile: false, infoLog: 'File is in codecTagStringsToNotProcess. Breaking out of plugin stack.' },
|
||||
},
|
||||
{
|
||||
input: {
|
||||
file: require('../sampleData/media/sampleH265_1.json'),
|
||||
librarySettings: {},
|
||||
inputs: {
|
||||
codecTagStringsToProcess: 'avc1,rand',
|
||||
},
|
||||
otherArguments: {},
|
||||
},
|
||||
output: { processFile: false, infoLog: 'File is not in codecTagStringsToProcess. Breaking out of plugin stack.' },
|
||||
},
|
||||
{
|
||||
input: {
|
||||
file: require('../sampleData/media/sampleH265_1.json'),
|
||||
librarySettings: {},
|
||||
inputs: {
|
||||
codecTagStringsToNotProcess: 'avc1,rand',
|
||||
},
|
||||
otherArguments: {},
|
||||
},
|
||||
output: { processFile: true, infoLog: 'File is not in codecTagStringsToNotProcess. Moving to next plugin.' },
|
||||
},
|
||||
];
|
||||
|
||||
run(tests);
|
||||
Loading…
Add table
Add a link
Reference in a new issue