!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/beximco/mrp_process/node_modules/@humanwhocodes/object-schema/tests/   drwxr-xr-x
Free 13.37 GB of 57.97 GB (23.06%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     merge-strategy.js (1.89 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/**
 * @filedescription Merge Strategy Tests
 */
/* global it, describe, beforeEach */

"use strict";

//-----------------------------------------------------------------------------
// Requirements
//-----------------------------------------------------------------------------

const assert = require("chai").assert;
const { MergeStrategy } = require("../src/");

//-----------------------------------------------------------------------------
// Class
//-----------------------------------------------------------------------------

describe("MergeStrategy", () => {


    describe("overwrite()", () => {

        it("should overwrite the first value with the second when the second is defined", () => {
            const result = MergeStrategy.overwrite(1, 2);
            assert.strictEqual(result, 2);
        });

        it("should overwrite the first value with the second when the second is undefined", () => {
            const result = MergeStrategy.overwrite(1, undefined);
            assert.strictEqual(result, undefined);
        });

    });

    describe("replace()", () => {

        it("should overwrite the first value with the second when the second is defined", () => {
            const result = MergeStrategy.replace(1, 2);
            assert.strictEqual(result, 2);
        });

        it("should return the first value when the second is undefined", () => {
            const result = MergeStrategy.replace(1, undefined);
            assert.strictEqual(result, 1);
        });

    });

    describe("assign()", () => {

        it("should merge properties from two objects when called", () => {

            const object1 = { foo: 1, bar: 3 };
            const object2 = { foo: 2 };            
            
            const result = MergeStrategy.assign(object1, object2);
            assert.deepStrictEqual(result, {
                foo: 2,
                bar: 3
            });
        });

    });

});

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0152 ]--