From 0d07cd222c525cb83ce9234d2c11c38f54cfa09d Mon Sep 17 00:00:00 2001 From: Libor Polčák Date: Jun 24 2022 10:52:41 +0000 Subject: unittest: Fix some wS-GEO tests --- diff --git a/tests/unit_tests/config/global.json b/tests/unit_tests/config/global.json index c387bf1..9ee9918 100644 --- a/tests/unit_tests/config/global.json +++ b/tests/unit_tests/config/global.json @@ -259,6 +259,17 @@ "test_script_requirements": [] }, { + "name": "alea", + "remove_custom_namespace": false, + "let_to_var": false, + "src_script_requirements": [], + "test_script_requirements": [], + "inject_code_to_src": { + "begin": "domainHash = '0000000000000000';", + "end": "eval(alea);" + } + }, + { "name": "wrappingS-GEO", "remove_custom_namespace": true, "let_to_var": true, @@ -271,6 +282,12 @@ "objects": [ "add_wrappers" ] + }, + { + "from": "./alea.js", + "objects": [ + "alea" + ] } ] } @@ -293,6 +310,12 @@ "processOriginalGPSDataObject", "wrappers" ] + }, + { + "from": "./alea.js", + "objects": [ + "alea" + ] } ] } @@ -313,7 +336,7 @@ ], "inject_code_to_src": { - "begin": "function gen_random32() { return 0.2 * 4294967295; } function successCallback(arg) { return arg; } WrapHelper = { XRAY: false, shared: {}, forPage: function(param) {return param}, isForPage: obj => pageReady.has(obj), defineProperty: Object.defineProperty, defineProperties: Object.defineProperties, create: Object.create, OriginalProxy: Proxy, Proxy: Proxy };" + "begin": "function gen_random32() { return 0.2 * 4294967295; } function successCallback(arg) { return arg; } WrapHelper = { XRAY: false, shared: {}, forPage: function(param) {return param}, isForPage: obj => pageReady.has(obj), defineProperty: Object.defineProperty, defineProperties: Object.defineProperties, create: Object.create, a: 1, OriginalProxy: Proxy, Proxy: Proxy };" } }, { diff --git a/tests/unit_tests/tests/wrappingS-GEO_tests.js b/tests/unit_tests/tests/wrappingS-GEO_tests.js index 9acba63..8d266c7 100644 --- a/tests/unit_tests/tests/wrappingS-GEO_tests.js +++ b/tests/unit_tests/tests/wrappingS-GEO_tests.js @@ -23,6 +23,8 @@ /// +const domainHash = "0000000000000000"; + describe("GEO", function() { describe("processOriginalGPSDataObject_globals", function() { it("should be defined.",function() {