MCPcopy
hub / github.com/codeceptjs/CodeceptJS / addScenario

Function addScenario

lib/mocha/ui.js:54–70  ·  view source on GitHub ↗
(title, opts = {}, fn)

Source from the content-addressed store, hash-verified

52 const cmn = common(suites, context, mocha)
53
54 const addScenario = function (title, opts = {}, fn) {
55 const suite = suites[0]
56
57 if (typeof opts === 'function' && !fn) {
58 fn = opts
59 opts = {}
60 }
61 if (suite.pending) {
62 fn = null
63 }
64 const test = createTest(title, fn)
65 test.file = file
66 test.addToSuite(suite)
67 test.applyOptions(opts)
68
69 return new ScenarioConfig(test)
70 }
71
72 // create dispatcher
73

Callers 1

ui.jsFile · 0.85

Calls 3

createTestFunction · 0.90
addToSuiteMethod · 0.80
applyOptionsMethod · 0.65

Tested by

no test coverage detected