403Webshell
Server IP : 159.203.156.69  /  Your IP : 216.73.217.172
Web Server : nginx/1.24.0
System : Linux main-ubuntu 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/tanviranik.com/node_modules/tsconfig-paths/lib/__tests__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/tanviranik.com/node_modules/tsconfig-paths/lib/__tests__/filesystem.test.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Filesystem = require("../filesystem");
var path = require("path");
describe("filesystem", function () {
    var fileThatExists = path.join(__dirname, "../../package.json");
    var fileThatNotExists = path.join(__dirname, "../../package2.json");
    it("should find file that exists, sync", function () {
        var result = Filesystem.fileExistsSync(fileThatExists);
        // assert.equal(result, true);
        expect(result).toBe(true);
    });
    it("should not find file that not exists, sync", function () {
        var result = Filesystem.fileExistsSync(fileThatNotExists);
        // assert.equal(result, false);
        expect(result).toBe(false);
    });
    it("should find file that exists, async", function (done) {
        Filesystem.fileExistsAsync(fileThatExists, function (_err, result) {
            try {
                // assert.equal(result, true);
                expect(result).toBe(true);
                done();
            }
            catch (error) {
                done(error);
            }
        });
    });
    it("should not find file that not exists, async", function (done) {
        Filesystem.fileExistsAsync(fileThatNotExists, function (_err, result) {
            try {
                // assert.equal(result, false);
                expect(result).toBe(false);
                done();
            }
            catch (error) {
                done(error);
            }
        });
    });
    it("should load json, sync", function () {
        var result = Filesystem.readJsonFromDiskSync(fileThatExists);
        // assert.isOk(result);
        expect(result);
        // assert.equal(result.main, "lib/index.js");
        expect(result.main).toBe("lib/index.js");
    });
    it("should load json, async", function (done) {
        Filesystem.readJsonFromDiskAsync(fileThatExists, function (_err, result) {
            try {
                // assert.isOk(result); // Asserts that object is truthy.
                expect(result).toBeTruthy();
                // assert.equal(result.main, "lib/index.js");
                expect(result.main).toBe("lib/index.js");
                done();
            }
            catch (error) {
                done(error);
            }
        });
    });
});
//# sourceMappingURL=filesystem.test.js.map

Youez - 2016 - github.com/yon3zu
LinuXploit