javascript

package
v2.3.0-beta17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package javascript implements the methods for javascript coverage services.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coverage

type Coverage map[string]struct {
	Path         string `json:"path"`
	StatementMap map[string]struct {
		StartTy `json:"start"`
		EndTy   `json:"end"`
	} `json:"statementMap"`
	FnMap map[string]struct {
		Name string `json:"name"`
		Decl struct {
			StartTy `json:"start"`
			EndTy   `json:"end"`
		} `json:"decl"`
		Loc  `json:"loc"`
		Line int `json:"line"`
	} `json:"fnMap"`
	BranchMap map[string]struct {
		Loc       `json:"loc"`
		Type      string `json:"type"`
		Locations []struct {
			StartTy `json:"start"`
			EndTy   `json:"end"`
		} `json:"locations"`
		Line int `json:"line"`
	} `json:"branchMap"`
	S              map[string]interface{} `json:"s"`
	F              map[string]interface{} `json:"f"`
	B              map[string]interface{} `json:"b"`
	CoverageSchema string                 `json:"_coverageSchema"`
	Hash           string                 `json:"hash"`
	ContentHash    string                 `json:"contentHash"`
}

type EndTy

type EndTy struct {
	Line   int `json:"line"`
	Column int `json:"column"`
}

type Javascript

type Javascript struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, logger *zap.Logger, reportDB coverage.ReportDB, cmd string) *Javascript

func (*Javascript) AppendCoverage

func (j *Javascript) AppendCoverage(coverage *models.TestCoverage, testRunID string) error

func (*Javascript) GetCoverage

func (j *Javascript) GetCoverage() (models.TestCoverage, error)

func (*Javascript) PreProcess

func (j *Javascript) PreProcess(disableLineCoverage bool) (string, error)

type Loc

type Loc struct {
	StartTy `json:"start"`
	EndTy   `json:"end"`
}

type ProcessInfo

type ProcessInfo struct {
	Parent           string   `json:"parent"`
	Pid              int      `json:"pid"`
	Argv             []string `json:"argv"`
	ExecArgv         []string `json:"execArgv"`
	Cwd              string   `json:"cwd"`
	Time             int      `json:"time"`
	Ppid             int      `json:"ppid"`
	CoverageFilename string   `json:"coverageFilename"`
	ExternalID       string   `json:"externalId"`
	UUID             string   `json:"uuid"`
	Files            []string `json:"files"`
}

type StartTy

type StartTy struct {
	Line   int `json:"line"`
	Column int `json:"column"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL