mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 23:48:15 -07:00
useCloneDeep
This commit is contained in:
parent
3032997079
commit
2dc25ebf8c
6 changed files with 23 additions and 23 deletions
|
|
@ -1,10 +1,11 @@
|
|||
/* eslint max-len: 0 */
|
||||
const _ = require('lodash');
|
||||
const run = require('../helpers/run');
|
||||
|
||||
const tests = [
|
||||
{
|
||||
input: {
|
||||
file: require('../sampleData/media/sampleH264_1.json'),
|
||||
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
|
||||
librarySettings: {},
|
||||
inputs: {},
|
||||
otherArguments: {},
|
||||
|
|
@ -21,7 +22,7 @@ const tests = [
|
|||
},
|
||||
{
|
||||
input: {
|
||||
file: require('../sampleData/media/sampleH265_1.json'),
|
||||
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
|
||||
librarySettings: {},
|
||||
inputs: {},
|
||||
otherArguments: {},
|
||||
|
|
@ -38,11 +39,11 @@ const tests = [
|
|||
},
|
||||
{
|
||||
input: {
|
||||
file: () => {
|
||||
const file = require('../sampleData/media/sampleH264_1.json');
|
||||
file: (() => {
|
||||
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
|
||||
file.meta.Title = undefined;
|
||||
return file;
|
||||
},
|
||||
})(),
|
||||
librarySettings: {},
|
||||
inputs: {},
|
||||
otherArguments: {},
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
/* eslint max-len: 0 */
|
||||
const _ = require('lodash');
|
||||
const run = require('../helpers/run');
|
||||
|
||||
const tests = [
|
||||
{
|
||||
input: {
|
||||
file: require('../sampleData/media/sampleH264_1.json'),
|
||||
file: _.cloneDeep(require('../sampleData/media/sampleH264_1.json')),
|
||||
librarySettings: {},
|
||||
inputs: {},
|
||||
otherArguments: {},
|
||||
|
|
@ -21,7 +22,7 @@ const tests = [
|
|||
},
|
||||
{
|
||||
input: {
|
||||
file: require('../sampleData/media/sampleH265_1.json'),
|
||||
file: _.cloneDeep(require('../sampleData/media/sampleH265_1.json')),
|
||||
librarySettings: {},
|
||||
inputs: {},
|
||||
otherArguments: {},
|
||||
|
|
@ -38,11 +39,11 @@ const tests = [
|
|||
},
|
||||
{
|
||||
input: {
|
||||
file: () => {
|
||||
const file = require('../sampleData/media/sampleH264_1.json');
|
||||
file: (() => {
|
||||
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
|
||||
file.meta.Title = undefined;
|
||||
return file;
|
||||
},
|
||||
})(),
|
||||
librarySettings: {},
|
||||
inputs: {},
|
||||
otherArguments: {},
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
/* eslint max-len: 0 */
|
||||
const _ = require('lodash');
|
||||
const run = require('../helpers/run');
|
||||
|
||||
const tests = [
|
||||
|
|
@ -30,7 +31,7 @@ const tests = [
|
|||
},
|
||||
otherArguments: {
|
||||
originalLibraryFile: (() => {
|
||||
const file = JSON.parse(JSON.stringify(require('../sampleData/media/sampleH264_1.json')));
|
||||
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
|
||||
file.file_size = 3;
|
||||
return file;
|
||||
})(),
|
||||
|
|
@ -51,7 +52,7 @@ const tests = [
|
|||
},
|
||||
otherArguments: {
|
||||
originalLibraryFile: (() => {
|
||||
const file = JSON.parse(JSON.stringify(require('../sampleData/media/sampleH264_1.json')));
|
||||
const file = _.cloneDeep(require('../sampleData/media/sampleH264_1.json'));
|
||||
file.file_size = 0.1;
|
||||
return file;
|
||||
})(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue