Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Require

Load external modules or javascript code

Search modules (branches) at : https://github.com/doanthuanthanh88/testapi6-modules

- Require:
    root: /home/user
    modules: 
      - ./my-librarry/dist/index.js
      - /home/user/my-librarry/dist/index.js
    code: |
      Vars.url = http://test_url_here
      Validate.globalCheck = () => true

Hierarchy

  • Tag
    • Require

Index

Constructors

constructor

Properties

async

async: boolean

Run async

code

code: string

Javascript code

Embed variables:
  - Vars: Global variable
  - Validate: Global validators
  - ExternalLibraries: External module library
  - Utils: Global utility functions
  - Context: Global context
  - $: this
  - $$: parent which wrap this tag 

disabled

disabled: boolean

Ignore this, not run

ignoreError

ignoreError: boolean

Keep run the next when got error

modules

modules: string[]

External modules

root

root: string

Root path where modules are installed

  • npm: It auto load in npm global packages, prefix and binaries
  • yarn: It auto load in yarn global packages, prefix and binaries
  • "": It combine npm and yarn
  • /PATH_TO_MODULE: It auto load from this path

slient

slient: boolean

Not show log

testIt

testIt: boolean

Only allow run it then ignore others which not set testIt or set it to false

title

title: string

Step title

vars

vars: any

Declare global variable