51Degrees Pipeline for Python

tests.test_javascriptbuilder_object_name Namespace Reference

Detailed Description

The client side object's name can be set in the builder's settings
(obj_name) or per request (query.fod-js-object-name). The name is written
into the script as a variable name, a session storage key and a property
name, so these tests check that a different name works, and that a name
which is not a JavaScript identifier is never written into the script.

The script is checked with "node --check" and run in Node with a minimal
stand in for a browser (object_name_harness.js). Both need Node on the path,
which every GitHub hosted runner has.

Classes

class  JavaScriptBuilderObjectNameTests
class  JavaScriptBuilderObjectNameSettingTests

Functions

 _render (settings=None, evidence=None, logger=None)
 _write (script)
 _node (*args)
 _declared_names (script)

Variables

 NODE = shutil.which("node")
 HARNESS = os.path.join(os.path.dirname(__file__), "object_name_harness.js")

Function Documentation

◆ _declared_names()

_declared_names ( script)
protected

◆ _node()

_node ( * args)
protected

◆ _render()

_render ( settings = None,
evidence = None,
logger = None )
protected
Render the script for one request and return it.

◆ _write()

_write ( script)
protected

Variable Documentation

◆ HARNESS

tests.test_javascriptbuilder_object_name.HARNESS = os.path.join(os.path.dirname(__file__), "object_name_harness.js")

◆ NODE

tests.test_javascriptbuilder_object_name.NODE = shutil.which("node")