@seleniumhq/code-export-javascript-mocha 3.17.2 → 4.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.ts ADDED
@@ -0,0 +1,146 @@
1
+ // Licensed to the Software Freedom Conservancy (SFC) under one
2
+ // or more contributor license agreements. See the NOTICE file
3
+ // distributed with this work for additional information
4
+ // regarding copyright ownership. The SFC licenses this file
5
+ // to you under the Apache License, Version 2.0 (the
6
+ // "License"); you may not use this file except in compliance
7
+ // with the License. You may obtain a copy of the License at
8
+ //
9
+ // http://www.apache.org/licenses/LICENSE-2.0
10
+ //
11
+ // Unless required by applicable law or agreed to in writing,
12
+ // software distributed under the License is distributed on an
13
+ // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ // KIND, either express or implied. See the License for the
15
+ // specific language governing permissions and limitations
16
+ // under the License.
17
+
18
+ import {
19
+ codeExport as exporter,
20
+ generateHooks,
21
+ LanguageEmitter,
22
+ LanguageEmitterOpts,
23
+ } from '@seleniumhq/side-code-export'
24
+ import emitter from './command'
25
+ import location from './location'
26
+ import hooks from './hook'
27
+
28
+ // Define language options
29
+ export const displayName = 'JavaScript Mocha'
30
+
31
+ export const opts: LanguageEmitterOpts = {
32
+ emitter: emitter,
33
+ displayName,
34
+ name: 'javascript-mocha',
35
+ hooks: generateHooks(hooks),
36
+ fileExtension: '.spec.js',
37
+ commandPrefixPadding: ' ',
38
+ terminatingKeyword: '})',
39
+ commentPrefix: '//',
40
+ generateMethodDeclaration: function generateMethodDeclaration(name: string) {
41
+ return {
42
+ body: `async function ${exporter.parsers.uncapitalize(
43
+ exporter.parsers.sanitizeName(name)
44
+ )}() {`,
45
+ terminatingKeyword: '}',
46
+ }
47
+ },
48
+ // Create generators for dynamic string creation of primary entities (e.g., filename, methods, test, and suite)
49
+ generateTestDeclaration: function generateTestDeclaration(name: string) {
50
+ return `it('${name}', async function() {`
51
+ },
52
+ generateSuiteDeclaration: function generateSuiteDeclaration(name) {
53
+ return `describe('${name}', function() {`
54
+ },
55
+ generateFilename: function generateFilename(name) {
56
+ return `${exporter.parsers.uncapitalize(
57
+ exporter.parsers.sanitizeName(name)
58
+ )}${opts.fileExtension}`
59
+ },
60
+ }
61
+
62
+ const language: LanguageEmitter = {
63
+ emit: {
64
+ locator: location.emit,
65
+ command: emitter.emit,
66
+ suite: async function emitSuite({
67
+ baseUrl,
68
+ suite,
69
+ tests,
70
+ project,
71
+ enableOriginTracing,
72
+ beforeEachOptions,
73
+ enableDescriptionAsComment,
74
+ }) {
75
+ // @ts-expect-error globals yuck
76
+ global.baseUrl = baseUrl
77
+ const result = await exporter.emit.testsFromSuite(tests, suite, opts, {
78
+ enableOriginTracing,
79
+ generateTestDeclaration: opts.generateTestDeclaration,
80
+ enableDescriptionAsComment,
81
+ project,
82
+ })
83
+ const suiteDeclaration = opts.generateSuiteDeclaration(suite.name)
84
+ const _suite = await exporter.emit.suite(result, tests, {
85
+ ...opts,
86
+ suiteDeclaration,
87
+ suite,
88
+ suiteName: suite.name,
89
+ project,
90
+ beforeEachOptions,
91
+ })
92
+ return {
93
+ filename: opts.generateFilename(suite.name),
94
+ body: exporter.emit.orderedSuite(_suite),
95
+ }
96
+ },
97
+ // Emit an individual test, wrapped in a suite (using the test name as the suite name)
98
+ test: async function emitTest({
99
+ baseUrl,
100
+ test,
101
+ tests,
102
+ project,
103
+ enableOriginTracing,
104
+ beforeEachOptions,
105
+ enableDescriptionAsComment,
106
+ }) {
107
+ // @ts-expect-error globals yuck
108
+ global.baseUrl = baseUrl
109
+ const testDeclaration = opts.generateTestDeclaration(test.name)
110
+ const result = await exporter.emit.test(test, tests, {
111
+ ...opts,
112
+ testDeclaration,
113
+ enableOriginTracing,
114
+ enableDescriptionAsComment,
115
+ project,
116
+ })
117
+ const suiteName = test.name
118
+ const suiteDeclaration = opts.generateSuiteDeclaration(suiteName)
119
+ const _suite = await exporter.emit.suite(result, tests, {
120
+ ...opts,
121
+ suiteDeclaration,
122
+ suiteName,
123
+ project,
124
+ beforeEachOptions,
125
+ })
126
+ return {
127
+ filename: opts.generateFilename(test.name),
128
+ body: exporter.emit.orderedSuite(_suite),
129
+ }
130
+ },
131
+ },
132
+ opts,
133
+ register: {
134
+ command: emitter.register,
135
+ variable: opts.hooks.declareVariables.register,
136
+ dependency: opts.hooks.declareDependencies.register,
137
+ beforeAll: opts.hooks.beforeAll.register,
138
+ beforeEach: opts.hooks.beforeEach.register,
139
+ afterEach: opts.hooks.afterEach.register,
140
+ afterAll: opts.hooks.afterAll.register,
141
+ inEachBegin: opts.hooks.inEachBegin.register,
142
+ inEachEnd: opts.hooks.inEachEnd.register,
143
+ },
144
+ }
145
+
146
+ export default language
@@ -15,7 +15,7 @@
15
15
  // specific language governing permissions and limitations
16
16
  // under the License.
17
17
 
18
- import { codeExport as exporter } from '@seleniumhq/side-utils'
18
+ import { codeExport as exporter } from '@seleniumhq/side-code-export'
19
19
 
20
20
  const emitters = {
21
21
  id: emitId,
@@ -27,7 +27,7 @@ const emitters = {
27
27
  xpath: emitXpath,
28
28
  }
29
29
 
30
- export function emit(location) {
30
+ export function emit(location: string) {
31
31
  return exporter.emit.location(location, emitters)
32
32
  }
33
33
 
@@ -35,26 +35,26 @@ export default {
35
35
  emit,
36
36
  }
37
37
 
38
- function emitId(selector) {
38
+ function emitId(selector: string) {
39
39
  return Promise.resolve(`By.id("${selector}")`)
40
40
  }
41
41
 
42
- function emitName(selector) {
42
+ function emitName(selector: string) {
43
43
  return Promise.resolve(`By.name("${selector}")`)
44
44
  }
45
45
 
46
- function emitLink(selector) {
46
+ function emitLink(selector: string) {
47
47
  return Promise.resolve(`By.linkText("${selector}")`)
48
48
  }
49
49
 
50
- function emitPartialLinkText(selector) {
50
+ function emitPartialLinkText(selector: string) {
51
51
  return Promise.resolve(`By.partialLinkText("${selector}")`)
52
52
  }
53
53
 
54
- function emitCss(selector) {
54
+ function emitCss(selector: string) {
55
55
  return Promise.resolve(`By.css("${selector}")`)
56
56
  }
57
57
 
58
- function emitXpath(selector) {
58
+ function emitXpath(selector: string) {
59
59
  return Promise.resolve(`By.xpath("${selector}")`)
60
60
  }
@@ -15,7 +15,7 @@
15
15
  // specific language governing permissions and limitations
16
16
  // under the License.
17
17
 
18
- import { codeExport as exporter } from '@seleniumhq/side-utils'
18
+ import { codeExport as exporter } from '@seleniumhq/side-code-export'
19
19
 
20
20
  const emitters = {
21
21
  id: emitId,
@@ -24,7 +24,7 @@ const emitters = {
24
24
  index: emitIndex,
25
25
  }
26
26
 
27
- export function emit(location) {
27
+ export function emit(location: string) {
28
28
  return exporter.emit.selection(location, emitters)
29
29
  }
30
30
 
@@ -32,18 +32,18 @@ export default {
32
32
  emit,
33
33
  }
34
34
 
35
- function emitId(id) {
35
+ function emitId(id: string) {
36
36
  return Promise.resolve(`By.css("*[id='${id}']")`)
37
37
  }
38
38
 
39
- function emitValue(value) {
39
+ function emitValue(value: string) {
40
40
  return Promise.resolve(`By.css("*[value='${value}']")`)
41
41
  }
42
42
 
43
- function emitLabel(label) {
43
+ function emitLabel(label: string) {
44
44
  return Promise.resolve(`By.xpath("//option[. = '${label}']")`)
45
45
  }
46
46
 
47
- function emitIndex(index) {
47
+ function emitIndex(index: string) {
48
48
  return Promise.resolve(`By.css("*:nth-child(${index})")`)
49
49
  }
package/tsconfig.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "baseUrl": "./src",
5
+ "rootDir": "src",
6
+ "outDir": "dist"
7
+ },
8
+ "include": ["src/**/*.ts"],
9
+ "exclude": ["**/__mocks__", "**/__tests__"],
10
+ "references": [
11
+ {
12
+ "path": "../side-code-export"
13
+ },
14
+ {
15
+ "path": "../side-model"
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/.pnpm/typescript@4.8.4/node_modules/typescript/lib/lib.esnext.intl.d.ts","../side-code-export/dist/code-export/preprocessor.d.ts","../side-model/dist/types.d.ts","../side-model/dist/argtypes.d.ts","../side-model/dist/commands.d.ts","../side-model/dist/index.d.ts","../side-code-export/dist/code-export/hook.d.ts","../side-code-export/dist/types.d.ts","../side-code-export/dist/code-export/emit.d.ts","../side-code-export/dist/code-export/register.d.ts","../side-code-export/dist/code-export/find.d.ts","../side-code-export/dist/code-export/parsers.d.ts","../side-code-export/dist/code-export/prettify.d.ts","../side-code-export/dist/code-export/render.d.ts","../side-code-export/dist/code-export/utils.d.ts","../side-code-export/dist/code-export/index.d.ts","../side-code-export/dist/file-writer/emit-suite.d.ts","../side-code-export/dist/file-writer/emit-test.d.ts","../side-code-export/dist/file-writer/index.d.ts","../side-code-export/dist/string-escape/index.d.ts","../side-code-export/dist/project/index.d.ts","../side-code-export/dist/index.d.ts","./src/location.ts","./src/selection.ts","./src/command.ts","./src/hook.ts","./src/index.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/assert.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/assert/strict.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/globals.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/async_hooks.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/buffer.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/child_process.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/cluster.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/console.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/constants.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/crypto.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/dgram.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/dns.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/dns/promises.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/domain.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/events.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/fs.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/fs/promises.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/http.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/http2.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/https.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/inspector.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/module.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/net.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/os.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/path.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/perf_hooks.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/process.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/punycode.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/querystring.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/readline.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/repl.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/stream.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/stream/promises.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/stream/consumers.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/stream/web.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/string_decoder.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/test.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/timers.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/timers/promises.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/tls.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/trace_events.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/tty.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/url.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/util.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/v8.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/vm.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/wasi.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/worker_threads.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/zlib.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/globals.global.d.ts","../../node_modules/.pnpm/@types+node@16.11.64/node_modules/@types/node/ts4.8/index.d.ts","../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts","../../node_modules/.pnpm/jest-diff@27.5.1/node_modules/jest-diff/build/cleanupsemantic.d.ts","../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/types.d.ts","../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/index.d.ts","../../node_modules/.pnpm/jest-diff@27.5.1/node_modules/jest-diff/build/types.d.ts","../../node_modules/.pnpm/jest-diff@27.5.1/node_modules/jest-diff/build/difflines.d.ts","../../node_modules/.pnpm/jest-diff@27.5.1/node_modules/jest-diff/build/printdiffs.d.ts","../../node_modules/.pnpm/jest-diff@27.5.1/node_modules/jest-diff/build/index.d.ts","../../node_modules/.pnpm/jest-matcher-utils@27.5.1/node_modules/jest-matcher-utils/build/index.d.ts","../../node_modules/.pnpm/@types+jest@27.5.2/node_modules/@types/jest/index.d.ts"],"fileInfos":[{"version":"f20c05dbfe50a208301d2a1da37b9931bce0466eb5a1f4fe240971b4ecc82b67","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"9b087de7268e4efc5f215347a62656663933d63c0b1d7b624913240367b999ea","affectsGlobalScope":true},{"version":"3260e3386d9535b804205bdddb5618a9a27735bd22927f48ad54363abcd23d45","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"55f400eec64d17e888e278f4def2f254b41b89515d3b88ad75d5e05f019daddd","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"775d9c9fd150d5de79e0450f35bc8b8f94ae64e3eb5da12725ff2a649dccc777","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"8b79cac9f57821f27ed9a5d63e0a60148fdfab86cf2066d7d93cb0e5d6026927","ad3e6fc6281b0036180bee24a439ba1e3587b7ea8ba84e974693239638352d15","aaac729999565f9cbe5e2c821417f108f46f3c5a932a717ad366591c20eecae9","fbb0fc873377eb8fd3091e97a0b38f2ac02b27c6c613cf61ec941d72ad3c0b22","e5889c0f7db36740230d923eefb81491f8890737e4b0e1e66646c8770f96d0cb","63d1c422a82b68b6192aa80d1841ceafb0082b5537b163398b1b47e326b2f987","befbb27557bbc3f1e6b7c5deaca66b7d72bceb1ef332b1b1c41db4d9d81ff210","ea35db4d108bae9db024d853d39cc13716b04a06d95e69af666e7b261161c583","bd6a04ab3fc64eaae736955cd48ef52bfd94a11a0ef7694d451c79cb7c0f9130","60d861eaab9db1a35eb7d43829e59d493140124bfeeeac64298029552a660c6f","a5aa779662dc7e323f1c6c5924e654943cf619aafd0473303a47617bd9477554","52f824e4551b88ec365088441bc6232cd585e0b13b2e1f4b17aaa135c1e5b81d","4826631255bbd4e40b7a72fe15ad379276a2e37d4cb6dfb454e01d5df6cde82d","d073344f1c91f1b5a8fe503e26450c279a96b80285a0a45add61064c5940eaf6","fd6fe050df20d4405edad19550c1f9d5158c2438910e7f42a5ba9f5a132c3e94","896bec96ef1abd73556bb3d77c84ddaec7f4c5d2f5bec58804df244cf4e2762d","31ac9ce243bb9c300669b252a68fcf92fec9cdac119e480e8fbe651fef39a359","2e971399faf34ec2dd70870db2cde985b0fbe9fb4e934f23378057fbfc1afde6","cb96a8697472754b800531a598ddfe6ec0adf1a7e9004f407c3a0124b9cb2e81","e885be9b048709f26ef1263a2815849a7696a11ecbafdf2d662e7e459505be26","26d80ce722c3cadfeff780079219f53985c1830fee09448ddffd74d928f976e6",{"version":"ce714128bf9bec23e83de6e3bb2181186be6303ea19cf7fecdc9c879daf53bbd","signature":"f5ae5ecd2545719e46284288f8b2816ecd2deddbda8fa6694d5be7e05272abb8"},{"version":"07f5420eea5b00755e2150c17ca7f366701e99310fac34a6e09c28802ca9d4f6","signature":"f5ae5ecd2545719e46284288f8b2816ecd2deddbda8fa6694d5be7e05272abb8"},{"version":"f748eb7f48de2428e32e341c3a9cc0ac7c0860f05d1b6881291517a3e15c46a1","signature":"0b40d92094a54a37259e9f1226650a41bad702a85f1a0e9fc3378fe389089b68"},{"version":"0efefbd1c1dcc242824d8b302677805529695be2742112511cf204e7ff2c20f3","signature":"48098993532d799f9962d59639b7de8cf26f4e7ba24cd885d865daff0ca2a25c"},{"version":"88056c6ee4e96a9a04c2f5945bbe7f81f96acdf8bb99b42c44d44782f2a744b4","signature":"dd298838cda2b197398b9416465f8476a1dd7a47d55b6ab5b248c0efa4181f3c"},"0d5a2ee1fdfa82740e0103389b9efd6bfe145a20018a2da3c02b89666181f4d9","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"2f6c9750131d5d2fdaba85c164a930dc07d2d7e7e8970b89d32864aa6c72620c","affectsGlobalScope":true},"56d13f223ab40f71840795f5bef2552a397a70666ee60878222407f3893fb8d0",{"version":"aeeee3998c5a730f8689f04038d41cf4245c9edbf6ef29a698e45b36e399b8ed","affectsGlobalScope":true},"95843d5cfafced8f3f8a5ce57d2335f0bcd361b9483587d12a25e4bd403b8216","afc6e96061af46bcff47246158caee7e056f5288783f2d83d6858cd25be1c565",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","3a0c45fe95e8f0e2c5247d48acf3a522d2ef29f1ab0effb3c59a9c4fdd5edbcd","f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","c993aac3b6d4a4620ef9651497069eb84806a131420e4f158ea9396fb8eb9b8c","76650408392bf49a8fbf3e2b6b302712a92d76af77b06e2da1cc8077359c4409","0af3121e68297b2247dd331c0d24dba599e50736a7517a5622d5591aae4a3122","06ccebc2c2db57d6bdbca63b71c4ae5e6ddc42d972fd8f122d4c1a28aa111b25",{"version":"81e8508d1e82278f5d3fee936f267e00c308af36219bfcee2631f9513c9c4017","affectsGlobalScope":true},"413a4be7f94f631235bbc83dad36c4d15e5a2ff02bca1efdbd03636d6454631b","20c468256fd68d3ef1fa53526e76d51d6aa91711e84d72c0343589b99238287e","a5f6d22760eef0178bebc5b5b5664a403109615a9c49da879ccd84438bd55223","8d4c16a26d59e3ce49741a7d4a6e8206b884e226cf308667c7778a0b2c0fee7f","ee3bad055a79f188626b1a7046f04ab151fdd3581e55c51d32face175bd9d06f","d61c7c41eb1960b1285e242fd102c162b65c0522985b839fadda59874308a170",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"1dbccafbca82a60fdfb0fb3c28e2493ff76d06647a512dcf72a086022e8b6f91","d10f4929cd610c26926d6784fc3f9f4120b789c03081b5d65fb2d2670a00fa04","fb0989383c6109f20281b3d31265293daefdd76d0d30551782c1654e93704f48","a4210a84a82b3e7a8cec5b2f3616e46d523f4f10cc1576d8f2fb89d0987b341e",{"version":"8207e7e6db9aa5fc7e61c8f17ba74cf9c115d26f51f91ee93f790815a7ea9dfb","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","ee18f2da7a037c6ceeb112a084e485aead9ea166980bf433474559eac1b46553","29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","02b3239cf1b1ff8737e383ed5557f0247499d15f5bd21ab849b1a24687b6100c","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"33eee034727baf564056b4ea719075c23d3b4767d0b5f9c6933b81f3d77774d2","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637","a4471d2bdba495b2a6a30b8765d5e0282fa7009d88345a9528f73c37869d3b93",{"version":"aee7013623e7632fba449d4df1da92925b27d9b816cb05546044dbfe54c88ef4","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","c9d70d3d7191a66a81cb554557f8ed1cf736ea8397c44a864fe52689de18865a","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4",{"version":"1aad825534c73852a1f3275e527d729a2c0640f539198fdfdfeb83b839851910","affectsGlobalScope":true},"badae0df9a8016ac36994b0a0e7b82ba6aaa3528e175a8c3cb161e4683eec03e","c3db860bcaaaeb3bbc23f353bbda1f8ab82756c8d5e973bebb3953cb09ea68f2","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"e3685a8957b4e2af64c3f04a58289ee0858a649dbcd963a2b897fe85858ae18a","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322","462bccdf75fcafc1ae8c30400c9425e1a4681db5d605d1a0edb4f990a54d8094","5923d8facbac6ecf7c84739a5c701a57af94a6f6648d6229a6c768cf28f0f8cb","7adecb2c3238794c378d336a8182d4c3dd2c4fa6fa1785e2797a3db550edea62","dc12dc0e5aa06f4e1a7692149b78f89116af823b9e1f1e4eae140cd3e0e674e6","1bfc6565b90c8771615cd8cfcf9b36efc0275e5e83ac7d9181307e96eb495161","8a8a96898906f065f296665e411f51010b51372fa260d5373bf9f64356703190","7f82ef88bdb67d9a850dd1c7cd2d690f33e0f0acd208e3c9eba086f3670d4f73",{"version":"ccfd8774cd9b929f63ff7dcf657977eb0652e3547f1fcac1b3a1dc5db22d4d58","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./dist","rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":8},"fileIdsList":[[113,124,129],[69,113],[72,113],[73,78,113],[74,84,85,92,101,112,113],[74,75,84,92,113],[76,113],[77,78,85,93,113],[78,101,109,113],[79,81,84,92,113],[80,113],[81,82,113],[83,84,113],[84,113],[84,85,86,101,112,113],[84,85,86,101,113],[113],[87,92,101,112,113],[84,85,87,88,92,101,109,112,113],[87,89,101,109,112,113],[69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119],[84,90,113],[91,112,113],[81,84,92,101,113],[93,113],[94,113],[72,95,113],[96,111,113,117],[97,113],[98,113],[84,99,113],[99,100,113,115],[84,101,102,103,113],[101,103,113],[101,102,113],[104,113],[105,113],[84,107,108,113],[107,108,113],[78,92,109,113],[110,113],[92,111,113],[73,87,98,112,113],[78,113],[101,113,114],[113,115],[113,116],[73,78,84,86,95,101,112,113,115,117],[101,113,118],[113,122,125],[113,122,125,126,127],[113,124],[113,121,128],[113,123],[47,63,64,65,113],[63,113],[63,64,66,67,113],[43,47,48,49,113],[47,113],[47,49,50,113],[43,47,48,50,51,52,53,54,55,56,63,113],[49,50,113],[49,54,113],[49,113],[47,49,113],[58,59,113],[49,57,60,61,62,113],[47,48,57,113],[45,113],[44,45,46,113],[47,63],[63]],"referencedMap":[[130,1],[69,2],[70,2],[72,3],[73,4],[74,5],[75,6],[76,7],[77,8],[78,9],[79,10],[80,11],[81,12],[82,12],[83,13],[84,14],[85,15],[86,16],[71,17],[119,17],[87,18],[88,19],[89,20],[120,21],[90,22],[91,23],[92,24],[93,25],[94,26],[95,27],[96,28],[97,29],[98,30],[99,31],[100,32],[101,33],[103,34],[102,35],[104,36],[105,37],[106,17],[107,38],[108,39],[109,40],[110,41],[111,42],[112,43],[113,44],[114,45],[115,46],[116,47],[117,48],[118,49],[121,17],[122,17],[126,50],[128,51],[127,50],[125,52],[129,53],[124,54],[123,17],[8,17],[9,17],[11,17],[10,17],[2,17],[12,17],[13,17],[14,17],[15,17],[16,17],[17,17],[18,17],[19,17],[3,17],[4,17],[23,17],[20,17],[21,17],[22,17],[24,17],[25,17],[26,17],[5,17],[27,17],[28,17],[29,17],[30,17],[6,17],[31,17],[32,17],[33,17],[34,17],[7,17],[35,17],[40,17],[41,17],[36,17],[37,17],[38,17],[39,17],[1,17],[42,17],[66,55],[67,56],[68,57],[64,56],[65,56],[50,58],[52,59],[48,60],[57,61],[53,17],[43,17],[54,62],[51,62],[55,63],[56,64],[58,65],[59,65],[60,66],[63,67],[62,59],[61,17],[49,68],[45,17],[46,69],[47,70],[44,17]],"exportedModulesMap":[[130,1],[69,2],[70,2],[72,3],[73,4],[74,5],[75,6],[76,7],[77,8],[78,9],[79,10],[80,11],[81,12],[82,12],[83,13],[84,14],[85,15],[86,16],[71,17],[119,17],[87,18],[88,19],[89,20],[120,21],[90,22],[91,23],[92,24],[93,25],[94,26],[95,27],[96,28],[97,29],[98,30],[99,31],[100,32],[101,33],[103,34],[102,35],[104,36],[105,37],[106,17],[107,38],[108,39],[109,40],[110,41],[111,42],[112,43],[113,44],[114,45],[115,46],[116,47],[117,48],[118,49],[121,17],[122,17],[126,50],[128,51],[127,50],[125,52],[129,53],[124,54],[123,17],[8,17],[9,17],[11,17],[10,17],[2,17],[12,17],[13,17],[14,17],[15,17],[16,17],[17,17],[18,17],[19,17],[3,17],[4,17],[23,17],[20,17],[21,17],[22,17],[24,17],[25,17],[26,17],[5,17],[27,17],[28,17],[29,17],[30,17],[6,17],[31,17],[32,17],[33,17],[34,17],[7,17],[35,17],[40,17],[41,17],[36,17],[37,17],[38,17],[39,17],[1,17],[42,17],[66,71],[67,72],[68,72],[50,58],[52,59],[48,60],[57,61],[53,17],[43,17],[54,62],[51,62],[55,63],[56,64],[58,65],[59,65],[60,66],[63,67],[62,59],[61,17],[49,68],[45,17],[46,69],[47,70],[44,17]],"semanticDiagnosticsPerFile":[130,69,70,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,71,119,87,88,89,120,90,91,92,93,94,95,96,97,98,99,100,101,103,102,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,121,122,126,128,127,125,129,124,123,8,9,11,10,2,12,13,14,15,16,17,18,19,3,4,23,20,21,22,24,25,26,5,27,28,29,30,6,31,32,33,34,7,35,40,41,36,37,38,39,1,42,66,67,68,64,65,50,52,48,57,53,43,54,51,55,56,58,59,60,63,62,61,49,45,46,47,44],"latestChangedDtsFile":"./dist/index.d.ts"},"version":"4.8.4"}
package/.babelrc DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "presets": [
3
- ["@babel/preset-env",
4
- {
5
- "targets": {
6
- "node": "8"
7
- }
8
- }]
9
- ],
10
- "plugins": [
11
- "@babel/plugin-proposal-object-rest-spread"
12
- ]
13
- }
package/src/index.js DELETED
@@ -1,139 +0,0 @@
1
- // Licensed to the Software Freedom Conservancy (SFC) under one
2
- // or more contributor license agreements. See the NOTICE file
3
- // distributed with this work for additional information
4
- // regarding copyright ownership. The SFC licenses this file
5
- // to you under the Apache License, Version 2.0 (the
6
- // "License"); you may not use this file except in compliance
7
- // with the License. You may obtain a copy of the License at
8
- //
9
- // http://www.apache.org/licenses/LICENSE-2.0
10
- //
11
- // Unless required by applicable law or agreed to in writing,
12
- // software distributed under the License is distributed on an
13
- // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
- // KIND, either express or implied. See the License for the
15
- // specific language governing permissions and limitations
16
- // under the License.
17
-
18
- import { codeExport as exporter } from '@seleniumhq/side-utils'
19
- import emitter from './command'
20
- import location from './location'
21
- import { generateHooks } from './hook'
22
-
23
- // Define language options
24
- export const displayName = 'JavaScript Mocha'
25
-
26
- export let opts = {}
27
- opts.emitter = emitter
28
- opts.hooks = generateHooks()
29
- opts.fileExtension = '.spec.js'
30
- opts.commandPrefixPadding = ' '
31
- opts.terminatingKeyword = '})'
32
- opts.commentPrefix = '//'
33
- opts.generateMethodDeclaration = generateMethodDeclaration
34
-
35
- // Create generators for dynamic string creation of primary entities (e.g., filename, methods, test, and suite)
36
- function generateTestDeclaration(name) {
37
- return `it('${name}', async function() {`
38
- }
39
- function generateMethodDeclaration(name) {
40
- return {
41
- body: `async function ${exporter.parsers.uncapitalize(
42
- exporter.parsers.sanitizeName(name)
43
- )}() {`,
44
- terminatingKeyword: '}',
45
- }
46
- }
47
- function generateSuiteDeclaration(name) {
48
- return `describe('${name}', function() {`
49
- }
50
- function generateFilename(name) {
51
- return `${exporter.parsers.uncapitalize(
52
- exporter.parsers.sanitizeName(name)
53
- )}${opts.fileExtension}`
54
- }
55
-
56
- // Emit an individual test, wrapped in a suite (using the test name as the suite name)
57
- export async function emitTest({
58
- baseUrl,
59
- test,
60
- tests,
61
- project,
62
- enableOriginTracing,
63
- beforeEachOptions,
64
- enableDescriptionAsComment,
65
- }) {
66
- global.baseUrl = baseUrl
67
- const testDeclaration = generateTestDeclaration(test.name)
68
- const result = await exporter.emit.test(test, tests, {
69
- ...opts,
70
- testDeclaration,
71
- enableOriginTracing,
72
- enableDescriptionAsComment,
73
- project,
74
- })
75
- const suiteName = test.name
76
- const suiteDeclaration = generateSuiteDeclaration(suiteName)
77
- const _suite = await exporter.emit.suite(result, tests, {
78
- ...opts,
79
- suiteDeclaration,
80
- suiteName,
81
- project,
82
- beforeEachOptions,
83
- })
84
- return {
85
- filename: generateFilename(test.name),
86
- body: exporter.emit.orderedSuite(_suite),
87
- }
88
- }
89
-
90
- // Emit a suite with all of its tests
91
- export async function emitSuite({
92
- baseUrl,
93
- suite,
94
- tests,
95
- project,
96
- enableOriginTracing,
97
- beforeEachOptions,
98
- enableDescriptionAsComment,
99
- }) {
100
- global.baseUrl = baseUrl
101
- const result = await exporter.emit.testsFromSuite(tests, suite, opts, {
102
- enableOriginTracing,
103
- generateTestDeclaration,
104
- enableDescriptionAsComment,
105
- project,
106
- })
107
- const suiteDeclaration = generateSuiteDeclaration(suite.name)
108
- const _suite = await exporter.emit.suite(result, tests, {
109
- ...opts,
110
- suiteDeclaration,
111
- suite,
112
- project,
113
- beforeEachOptions,
114
- })
115
- return {
116
- filename: generateFilename(suite.name),
117
- body: exporter.emit.orderedSuite(_suite),
118
- }
119
- }
120
-
121
- export default {
122
- emit: {
123
- test: emitTest,
124
- suite: emitSuite,
125
- command: emitter.emit,
126
- locator: location.emit,
127
- },
128
- register: {
129
- command: emitter.register,
130
- variable: opts.hooks.declareVariables.register,
131
- dependency: opts.hooks.declareDependencies.register,
132
- beforeAll: opts.hooks.beforeAll.register,
133
- beforeEach: opts.hooks.beforeEach.register,
134
- afterEach: opts.hooks.afterEach.register,
135
- afterAll: opts.hooks.afterAll.register,
136
- inEachBegin: opts.hooks.inEachBegin.register,
137
- inEachEnd: opts.hooks.inEachEnd.register,
138
- },
139
- }