Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ChaiRootModule ¶
type ChaiRootModule struct {
// contains filtered or unexported fields
}
func (*ChaiRootModule) NewModuleInstance ¶
func (root *ChaiRootModule) NewModuleInstance(vu VU) Instance
type CommModule ¶
type CommModule struct {
// contains filtered or unexported fields
}
func (*CommModule) Exports ¶
func (mod *CommModule) Exports() Exports
type CompatibilityMode ¶
type CompatibilityMode uint8
CompatibilityMode specifies the JS compatibility mode
const ( // CompatibilityModeExtended achieves ES6+ compatibility with Babel CompatibilityModeExtended CompatibilityMode = iota + 1 // CompatibilityModeBase is standard goja ES5.1+ CompatibilityModeBase )
type Compiler ¶
type Compiler struct {
Options Options
// contains filtered or unexported fields
}
A Compiler compiles JavaScript source code (ES5.1 or ES6) into a goja.Program
type Exports ¶
type Exports struct {
// Default is what will be the `default` export of a module
Default interface{}
// Named is the named exports of a module
Named map[string]interface{}
}
type MochaRootModule ¶
type MochaRootModule struct {
// contains filtered or unexported fields
}
func (*MochaRootModule) NewModuleInstance ¶
func (root *MochaRootModule) NewModuleInstance(vu VU) Instance
type Module ¶
type Options ¶
type Options struct {
CompatibilityMode CompatibilityMode
SourceMapLoader func(string) ([]byte, error)
Strict bool
}
Options are options to the compiler
Click to show internal directories.
Click to hide internal directories.