MOON
Server: Apache
System: Linux 54-179-220-51.cprapid.com 3.10.0-1160.144.1.el7.tuxcare.els4.x86_64 #1 SMP Tue Apr 7 08:40:40 UTC 2026 x86_64
User: thehunarfound (1001)
PHP: 7.4.29
Disabled: NONE
Upload Files
File: /home/thehunarfound/public_html/DMSold/node_modules/ext/test/string_/includes/_tests.js
"use strict";

var assert = require("chai").assert;

module.exports = function (includes) {
	it("Should return true when context contains search string", function () {
		assert.equal(includes.call("razdwatrzy", "dwa"), true);
	});
	it("Should return true when context starts with search string", function () {
		assert.equal(includes.call("razdwa", "raz"), true);
	});
	it("Should return true when context ends with search string", function () {
		assert.equal(includes.call("razdwa", "dwa"), true);
	});
	it("Should return false when string doesn't contain search string", function () {
		assert.equal(includes.call("razdwa", "trzy"), false);
	});
	it("Should return false when context is empty and search string is not", function () {
		assert.equal(includes.call("", "a"), false);
	});
	it("Should return false when search string is longer than context", function () {
		assert.equal(includes.call("raz", "razdwa"), false);
	});
	it("Should return true when search string is same as context ", function () {
		assert.equal(includes.call("raz", "raz"), true);
	});
	it("Should return true when context starts with search string", function () {
		assert.equal(includes.call("razdwa", "raz"), true);
	});
	it("Should return true when search string is empty", function () {
		assert.equal(includes.call("raz", ""), true);
	});
	it("Should return true when both context and search string are empty", function () {
		assert.equal(includes.call("", ""), true);
	});
	it("Should support position argument", function () {
		assert.equal(includes.call("razdwa", "raz", 1), false);
		assert.equal(includes.call("razdwa", "dwa", 1), true);
	});
};
;;